$ cat bug.c
extern void f (__float128);
void g(void)
{
  __builtin_alloca (2);
  f (0);
}
$ gcc -m32 -mpreferred-stack-boundary=2 -c bug.c
bug.c: In function ‘g’:
bug.c:5:5: internal compiler error: in expand_call, at calls.c:2840
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.

First seen in modified GCC, but with some modifications to the code the ICE
also triggers on unpatched GCC on x86 with the above code. Tested with GCC
4.4.4 from Fedora and GCC 4.5.0 from Gentoo.

With -mno-accumulate-outgoing-args, GCC accepts the code.


-- 
           Summary: ICE in expand_call, at calls.c:2845 when passing aligned
                    function argument from unaligned stack after alloca
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: truedfx at gentoo dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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

Reply via email to