This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]