The following code:

---------------------------------------------------------------------------
typedef float V8SF __attribute__ ((vector_size (32)));
void test0 (V8SF);
void
foo (float x)
{
  test ((V8SF) { x, x, x, x, x, x, x, x });
}
---------------------------------------------------------------------------

causes an ICE on targets for which the vector argument is callee-copied:

---------------------------------------------------------------------------
/tmp/foo.c: In function 'foo':
/tmp/foo.c:6: internal compiler error: in copy_constant, at varasm.c:3067
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
---------------------------------------------------------------------------

We try to take the address of the original CONSTRUCTOR (rather than
a temporary as in the caller-copied case) and expand_expr_addr_expr_1
assumes that all constructors are constant.


-- 
           Summary: ICE for nonconstant callee-copied constructor arguments
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rsandifo at gcc dot gnu dot org
GCC target triplet: mipsisa32-elf


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

Reply via email to