public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/55021] New: [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529
@ 2012-10-22 13:25 dominiq at lps dot ens.fr
2012-10-22 13:42 ` [Bug lto/55021] " rguenth at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-22 13:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55021
Bug #: 55021
Summary: [4.8 Regression] The tests
gfortran.dg/integer_exponentiation_5.F90 and
masklr_1.F90 are miscompiled with -flto after revision
192529
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dominiq@lps.ens.fr
CC: rguenth@gcc.gnu.org
The tests gfortran.dg/integer_exponentiation_5.F90 (with -O1) and masklr_1.F90
are miscompiled with -flto after revision 192529 (r192528 is OK):
[macbook] f90/bug% /opt/gcc/gcc4.8p-192559/bin/gfortran
/opt/gcc/work/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90
-fno-range-check -O1 -flto
[macbook] f90/bug% a.out
Backtrace for this error:
#0 0x1000041ae
#1 0x100004536
#2 0x1000d6108
#3 0x100000c19
#4 0x100000cd5
Abort
[macbook] f90/bug% /opt/gcc/gcc4.8p-192559/bin/gfortran
/opt/gcc/work/gcc/testsuite/gfortran.dg/masklr_1.F90 -ffree-line-length-none
-flto
[macbook] f90/bug% a.out
Backtrace for this error:
#0 0x1000051ae
#1 0x100005536
#2 0x1000d7108
#3 0x100001b33
#4 0x100001cff
Abort
Reduced test case
module mod_check
implicit none
contains
subroutine check_i8 (a, b)
integer(kind=8), intent(in) :: a, b
if (a /= b) call abort()
end subroutine check_i8
end module mod_check
program test
use mod_check
implicit none
integer(kind=8) :: i8
i8 = 3_8
call check_i8(i8**43_8,3_8**43_8)
end program test
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/55021] [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529
2012-10-22 13:25 [Bug lto/55021] New: [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529 dominiq at lps dot ens.fr
@ 2012-10-22 13:42 ` rguenth at gcc dot gnu.org
2012-10-22 13:48 ` dominiq at lps dot ens.fr
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-22 13:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55021
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2012-10-22
Ever Confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-22 13:42:33 UTC ---
I get
> ./gfortran -B. -B ../x86_64-unknown-linux-gnu/libgfortran/.libs t.f90 -ffree-line-length-none
t.f90:20.28:
call check_i8(i8**43_8,3_8**43_8)
1
Error: Arithmetic overflow at (1)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/55021] [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529
2012-10-22 13:25 [Bug lto/55021] New: [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529 dominiq at lps dot ens.fr
2012-10-22 13:42 ` [Bug lto/55021] " rguenth at gcc dot gnu.org
@ 2012-10-22 13:48 ` dominiq at lps dot ens.fr
2012-10-22 14:06 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-22 13:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55021
--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-10-22 13:48:27 UTC ---
> I get
>
> > ./gfortran -B. -B ../x86_64-unknown-linux-gnu/libgfortran/.libs t.f90 -ffree-line-length-none
> t.f90:20.28:
>
> call check_i8(i8**43_8,3_8**43_8)
> 1
> Error: Arithmetic overflow at (1)
If t.f90 is the reduced test in comment #0 (reduced from
integer_exponentiation_5.F90), you need -fno-range-check (no need for
-ffree-line-length-none).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/55021] [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529
2012-10-22 13:25 [Bug lto/55021] New: [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529 dominiq at lps dot ens.fr
2012-10-22 13:42 ` [Bug lto/55021] " rguenth at gcc dot gnu.org
2012-10-22 13:48 ` dominiq at lps dot ens.fr
@ 2012-10-22 14:06 ` rguenth at gcc dot gnu.org
2012-10-22 14:08 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-22 14:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55021
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-22 14:05:36 UTC ---
Confirmed. Note that due to a Frontend issue (wrong decls for check_i8?)
without LTO no inlining takes place. As soon as we inline we have
_gfortran_set_options (7, &options.0[0]);
_10 = 0xffffffff00000000565d7b7b;
_7 = _10;
_8 = -3784425932234851461;
if (_7 != _8)
goto <bb 3>;
from
D.1880 = -3784425932234851461;
check_i8 (&D.1880, &C.1881);
With the simplified
subroutine check_i8 (a, b)
integer(kind=8), intent(in) :: a, b
if (a /= b) call abort()
end subroutine check_i8
program test
implicit none
integer(kind=8) :: i8
i8 = 3_8
call check_i8(i8**43_8,3_8**43_8)
end program test
I can get non-LTO to inline check_i8 with -fwhole-prgram.
I think your bisection is wrong and
2012-10-18 Richard Guenther <rguenther@suse.de>
* lto-streamer.h (enum LTO_tags): Add LTO_integer_cst.
* lto-streamer-in.c (lto_input_tree): Use it.
* lto-streamer-out.c (lto_output_tree): Likewise, for
!TREE_OVERFLOW integer constants only.
* tree-streamer-in.c (unpack_ts_int_cst_value_fields): New function.
(unpack_value_fields): Call it.
(streamer_read_integer_cst): Simplify.
* tree-streamer-out.c (pack_ts_int_cst_value_fields): New function.
(streamer_pack_tree_bitfields): Call it.
(streamer_write_integer_cst): Adjust.
must be the issue. Very likely we have an INTEGER_CST with TREE_OVERFLOW
flag set.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/55021] [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529
2012-10-22 13:25 [Bug lto/55021] New: [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529 dominiq at lps dot ens.fr
` (2 preceding siblings ...)
2012-10-22 14:06 ` rguenth at gcc dot gnu.org
@ 2012-10-22 14:08 ` rguenth at gcc dot gnu.org
2012-10-22 14:10 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-22 14:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55021
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
Target Milestone|--- |4.8.0
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-22 14:07:37 UTC ---
I have an obvious patch.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/55021] [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529
2012-10-22 13:25 [Bug lto/55021] New: [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529 dominiq at lps dot ens.fr
` (3 preceding siblings ...)
2012-10-22 14:08 ` rguenth at gcc dot gnu.org
@ 2012-10-22 14:10 ` rguenth at gcc dot gnu.org
2012-10-22 14:11 ` rguenth at gcc dot gnu.org
2012-10-22 14:15 ` dominiq at lps dot ens.fr
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-22 14:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55021
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-22 14:10:31 UTC ---
Author: rguenth
Date: Mon Oct 22 14:10:06 2012
New Revision: 192691
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192691
Log:
2012-10-22 Richard Biener <rguenther@suse.de>
PR lto/55021
* tree-streamer-in.c (unpack_ts_int_cst_value_fields): Remove
bogus truncations.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-streamer-in.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/55021] [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529
2012-10-22 13:25 [Bug lto/55021] New: [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529 dominiq at lps dot ens.fr
` (4 preceding siblings ...)
2012-10-22 14:10 ` rguenth at gcc dot gnu.org
@ 2012-10-22 14:11 ` rguenth at gcc dot gnu.org
2012-10-22 14:15 ` dominiq at lps dot ens.fr
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-22 14:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55021
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-22 14:10:49 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/55021] [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529
2012-10-22 13:25 [Bug lto/55021] New: [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529 dominiq at lps dot ens.fr
` (5 preceding siblings ...)
2012-10-22 14:11 ` rguenth at gcc dot gnu.org
@ 2012-10-22 14:15 ` dominiq at lps dot ens.fr
6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-22 14:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55021
--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-10-22 14:14:19 UTC ---
> I think your bisection is wrong ...
Indeed I meant r192559 (see /opt/gcc/gcc4.8p-192559/bin/gfortran in comment#0).
Thanks for the quick fix.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-10-22 14:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-22 13:25 [Bug lto/55021] New: [4.8 Regression] The tests gfortran.dg/integer_exponentiation_5.F90 and masklr_1.F90 are miscompiled with -flto after revision 192529 dominiq at lps dot ens.fr
2012-10-22 13:42 ` [Bug lto/55021] " rguenth at gcc dot gnu.org
2012-10-22 13:48 ` dominiq at lps dot ens.fr
2012-10-22 14:06 ` rguenth at gcc dot gnu.org
2012-10-22 14:08 ` rguenth at gcc dot gnu.org
2012-10-22 14:10 ` rguenth at gcc dot gnu.org
2012-10-22 14:11 ` rguenth at gcc dot gnu.org
2012-10-22 14:15 ` dominiq at lps dot ens.fr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).