[Bug tree-optimization/23155] Gimplification failed for union cast

dje at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Jul 31 04:23:00 GMT 2005


------- Additional Comments From dje at gcc dot gnu dot org  2005-07-31 04:21 -------
Sorry, there was a typo in the previous example.  The correct example is:

typedef short __attribute__((vector_size (16))) v8hi;
union vx {short f[8]; v8hi v;};

extern void bar1(v8hi);

void
foo5 (v8hi vec, short n)
{
  ((union vx) vec).f[5] = n;
  bar1 (vec);
}

and the output is:

$ ./xgcc -B./ -O0 -S a.c
gimplification failed:
{.v=vec} <constructor 0x426c1c00
    type <union_type 0x426ba770 vx type_0 BLK
        size <integer_cst 0x42611a60 constant invariant 128>
        unit size <integer_cst 0x42611a80 constant invariant 16>
        align 128 symtab 0 alias set -1
        fields <field_decl 0x426ba8c0 f type <array_type 0x42694d20>
            BLK file a.c line 2 size <integer_cst 0x42611a60 128> unit size
<integer_cst 0x42611a80 16>
            align 16 offset_align 128
            offset <integer_cst 0x42611400 constant invariant 0>
            bit offset <integer_cst 0x42611e80 constant invariant 0> context
<union_type 0x426ba770 vx> chain <field_decl 0x426ba930 v>>
        chain <type_decl 0x42620a00 D.1265>>
   
    arg 0 <tree_list 0x426c1be0
        purpose <field_decl 0x426ba930 v type <vector_type 0x426ba700 v8hi>
            TI file a.c line 2 size <integer_cst 0x42611a60 128> unit size
<integer_cst 0x42611a80 16>
            align 128 offset_align 128 offset <integer_cst 0x42611400 0> bit
offset <integer_cst 0x42611e80 0> context <union_type 0x426ba770 vx>>
        value <parm_decl 0x426baa80 vec type <vector_type 0x426ba700 v8hi>
            used TI file a.c line 7 size <integer_cst 0x42611a60 128> unit size 
<integer_cst 0x42611a80 16>
            align 128 context <function_decl 0x426bb800 foo5> initial
<vector_type 0x426ba700 v8hi> arg-type <vector_type 0x426ba700 v8hi> chain
<parm_decl 0x426baaf0 n>>>>
a.c: In function 'foo5':
a.c:9: internal compiler error: gimplification failed

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |tree-optimization
            Summary|[4.0/4.1 Regression]        |Gimplification failed for
                   |Gimplification failed for   |union cast
                   |union cast                  |
   Target Milestone|4.0.2                       |---


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



More information about the Gcc-bugs mailing list