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 fortran/42397] FAIL: gfortran.dg/lto/20091028-2 f_lto_20091028-2_0.o-f_lto_20091028-2_1.o link, internal compiler error



------- Comment #5 from rguenth at gcc dot gnu dot org  2009-12-17 11:23 -------
I can reproduce it on i?86-linux with an extra assert.

Index: gcc/expr.c
===================================================================
--- gcc/expr.c  (revision 155297)
+++ gcc/expr.c  (working copy)
@@ -1194,6 +1194,7 @@ emit_block_move_hints (rtx x, rtx y, rtx
     }

   align = MIN (MEM_ALIGN (x), MEM_ALIGN (y));
+  gcc_assert (align >= BITS_PER_UNIT);

   gcc_assert (MEM_P (x));
   gcc_assert (MEM_P (y));


the testcase is sort-of invalid as it stores to a CONST_DECL via a memcpy.
But it's only undefined at runtime so we shouldn't ICE here.  CONST_DECLs
are given 1 as alignment appearantly which is sort-of bogus - they
should get the alignment of the mode or at least BITS_PER_UNIT and
get_object_alignment doesn't honor that.

I have a patch.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-12-17 11:23:50
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42397


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