https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88587

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-01-07
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
            Summary|internal compiler error: in |ICE in
                   |expand_debug_locations, at  |expand_debug_locations, at
                   |cfgexpand.c:5450            |cfgexpand.c:5450
     Ever confirmed|0                           |1

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, there's a reduced test-case:

$ cat pr88587.c
__attribute__((target_clones("default,sse2"))) void a() {
  __attribute__((__vector_size__(4 * sizeof(float)))) int b = {};
}

$ gcc -c -m32 -mno-sse -O -g pr88587.c
during RTL pass: expand
pr88587.c: In function ‘a.sse2.0’:
pr88587.c:1:53: internal compiler error: in expand_debug_locations, at
cfgexpand.c:5450
    1 | __attribute__((target_clones("default,sse2"))) void a() {
      |                                                     ^
0x8f386a expand_debug_locations
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:5446
0x8f6961 execute
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:6505

It's quite strange that following is fine:

$ cat pr88587-2.c
__attribute__((target("default"))) void a() {
  __attribute__((__vector_size__(4 * sizeof(float)))) int b = {};
}

__attribute__((target("sse2"))) void a2() {
  __attribute__((__vector_size__(4 * sizeof(float)))) int b = {};
}

$ gcc -c -m32 -mno-sse -O -g pr88587-2.c

I'll investigate how precisely the debug insn looks like in both situations.

Reply via email to