* [Bug lto/60427] [4.9 Regression] r208312 causes ICE and wrong code for Fortran with -flto
[not found] <bug-60427-4@http.gcc.gnu.org/bugzilla/>
@ 2014-03-05 11:51 ` rguenther at suse dot de
2014-03-05 12:02 ` Joost.VandeVondele at mat dot ethz.ch
` (3 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: rguenther at suse dot de @ 2014-03-05 11:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60427
--- Comment #1 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 5 Mar 2014, dominiq at lps dot ens.fr wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60427
>
> Bug ID: 60427
> Summary: [4.9 Regression] r208312 causes ICE and wrong code for
> Fortran with -flto
> Product: gcc
> Version: 4.9.0
> Status: UNCONFIRMED
> Severity: normal
> Priority: P3
> Component: lto
> Assignee: unassigned at gcc dot gnu.org
> Reporter: dominiq at lps dot ens.fr
> CC: pmatos at gcc dot gnu.org, rguenth at gcc dot gnu.org
>
> After r208312 (+ the fix in r208315) I get
>
> FAIL: gfortran.dg/pr33794.f90 -g -flto execution test
>
> with both -m32/-m64, and
>
> FAIL: gfortran.dg/nint_2.f90 -g -flto (internal compiler error)
>
> with -m64 (r208311 + the fix in r208315 is OK).
>
> The ICE occurs for the following reduced test
>
> real(kind=8) :: a
> integer(kind=8) :: i1
>
> ! a = nearest(0.5_8,-1.0_8)
> ! i1 = nint(a)
>
> a = 0.5_8
> i1 = nint(a)
>
> ! a = nearest(0.5_8,1.0_8)
> ! i1 = nint(a)
>
> end
>
> [Book15] f90/bug% /opt/gcc/gcc4.9p-208312/bin/gfortran -flto nint_2_red.f90
> nint_2_red.f90: In function 'MAIN__':
> nint_2_red.f90:8:0: internal compiler error: Segmentation fault: 11
> i1 = nint(a)
>
> The wong code is produced with '-O1 -ffast-math -flto' for
> gfortran.dg/pr33794.f90 as well as the polyhedron test fatigue.f90.
Hmm, this is because mathfn_built_in_1 does
if (TYPE_MAIN_VARIANT (type) == double_type_node)
fcode2 = fcode;
else if (TYPE_MAIN_VARIANT (type) == float_type_node)
fcode2 = fcodef;
else if (TYPE_MAIN_VARIANT (type) == long_double_type_node)
fcode2 = fcodel;
else
return NULL_TREE;
and we now have "two" double_type_nodes (the global tree built
by lto1 and the one that is now streamed literally).
IMHO we want to revert the patch at this point.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug lto/60427] [4.9 Regression] r208312 causes ICE and wrong code for Fortran with -flto
[not found] <bug-60427-4@http.gcc.gnu.org/bugzilla/>
2014-03-05 11:51 ` [Bug lto/60427] [4.9 Regression] r208312 causes ICE and wrong code for Fortran with -flto rguenther at suse dot de
@ 2014-03-05 12:02 ` Joost.VandeVondele at mat dot ethz.ch
2014-03-05 15:45 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2014-03-05 12:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60427
Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Joost.VandeVondele at mat dot ethz
| |.ch
--- Comment #2 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
*** Bug 60426 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug lto/60427] [4.9 Regression] r208312 causes ICE and wrong code for Fortran with -flto
[not found] <bug-60427-4@http.gcc.gnu.org/bugzilla/>
2014-03-05 11:51 ` [Bug lto/60427] [4.9 Regression] r208312 causes ICE and wrong code for Fortran with -flto rguenther at suse dot de
2014-03-05 12:02 ` Joost.VandeVondele at mat dot ethz.ch
@ 2014-03-05 15:45 ` rguenth at gcc dot gnu.org
2014-03-06 11:19 ` rguenth at gcc dot gnu.org
2014-03-06 11:28 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-05 15:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60427
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
Target Milestone|--- |4.9.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug lto/60427] [4.9 Regression] r208312 causes ICE and wrong code for Fortran with -flto
[not found] <bug-60427-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2014-03-05 15:45 ` rguenth at gcc dot gnu.org
@ 2014-03-06 11:19 ` rguenth at gcc dot gnu.org
2014-03-06 11:28 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-06 11:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60427
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Mar 6 11:19:13 2014
New Revision: 208379
URL: http://gcc.gnu.org/viewcvs?rev=208379&root=gcc&view=rev
Log:
2014-03-06 Richard Biener <rguenther@suse.de>
PR middle-end/60445
PR lto/60424
PR lto/60427
Revert
2014-03-04 Paulo Matos <paulo@matos-sorge.com>
* tree-streamer.c (record_common_node): Assert we don't record
nodes with type double.
(preload_common_node): Skip type double, complex double and
double pointer since it is now frontend dependent due to
fshort-double option.
* gcc.dg/lto/pr55113_0.c: New testcase.
Removed:
trunk/gcc/testsuite/gcc.dg/lto/pr55113_0.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-streamer.c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug lto/60427] [4.9 Regression] r208312 causes ICE and wrong code for Fortran with -flto
[not found] <bug-60427-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2014-03-06 11:19 ` rguenth at gcc dot gnu.org
@ 2014-03-06 11:28 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-06 11:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60427
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread