Discussion:
[patch] Fix internal error in LTO mode on Ada code
Eric Botcazou
2014-10-06 10:10:02 UTC
Permalink
Hi,

LTO quickly breaks on Ada code involving floating-point comparisons because
the Ada compiler defaults to -fnon-call-exceptions -fno-trapping-math (on most
platforms) and only -fnon-call-exceptions is restored on the LTO side, so you
can end up with the wrong number of edges on FP comparisons during LTRANS.

Tested on x86_64-suse-linux, OK for the mainline?


2014-10-06 Eric Botcazou <***@adacore.com>

* lto-opts.c (lto_write_options): Handle -fmath-errno, -fsigned-zeros
and -ftrapping-math.
* lto-wrapper.c (merge_and_complain): Likewise.
(run_gcc): Likewise.


2014-10-06 Eric Botcazou <***@adacore.com>

* gnat.dg/lto16.adb: New test.
* gnat.dg/lto16_pkg.adb: New helper.
--
Eric Botcazou
Richard Biener
2014-10-06 11:36:26 UTC
Permalink
Post by Eric Botcazou
Hi,
LTO quickly breaks on Ada code involving floating-point comparisons because
the Ada compiler defaults to -fnon-call-exceptions -fno-trapping-math (on most
platforms) and only -fnon-call-exceptions is restored on the LTO side, so you
can end up with the wrong number of edges on FP comparisons during LTRANS.
Tested on x86_64-suse-linux, OK for the mainline?
Ok.

Thanks,
Richard.
Post by Eric Botcazou
* lto-opts.c (lto_write_options): Handle -fmath-errno, -fsigned-zeros
and -ftrapping-math.
* lto-wrapper.c (merge_and_complain): Likewise.
(run_gcc): Likewise.
* gnat.dg/lto16.adb: New test.
* gnat.dg/lto16_pkg.adb: New helper.
--
Eric Botcazou
Loading...