[Bug middle-end/77989] [7 Regression] -O3 causes verify_gimple fail

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Oct 15 02:38:00 GMT 2016


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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-10-15
                 CC|                            |trippels at gcc dot gnu.org
          Component|c                           |middle-end
            Summary|-O3 causes verify_gimple    |[7 Regression] -O3 causes
                   |fail                        |verify_gimple fail
     Ever confirmed|0                           |1

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
markus@x4 tmp % cat fail.i
int a, d;
char b;
char *c;
void fn1() {
  char *e = &b;
  c = &b + 48;
  while (e < c)
    e++;
  e++;
  c = &b + a;
  while (e < c)
    d += *e++;
}

markus@x4 tmp % gcc -fchecking -O3 -c fail.i
fail.i: In function ‘fn1’:
fail.i:4:5: error: invalid address operand in MEM_REF
 int fn1() {
     ^~~
MEM[(void *)&b + 49B];

fail.i:4:5: error: invalid first operand of MEM_REF
&MEM[(void *)&b + 49B]
fail.i:12:10: note: in statement
     d += *e++;
          ^~~~
# VUSE <.MEM_59>
_15 = MEM[(void *)&b + 49B];
fail.i:4: confused by earlier errors, bailing out


More information about the Gcc-bugs mailing list