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

            Bug ID: 58011
           Summary: GCC segfaults at -O1
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: antoine.balestrat at gmail dot com

Using GCC 4.9.0 as of 20130728 :

$ cat seg.c
int a, b;

void f(unsigned p)
{
    unsigned *pp = &p;

    if(!a)
        p = 0;

    for(b = 0; b < 1; b++)
        if(3 * p + 5 * *pp)
            a = 0;
}

$ xgcc -O1 seg.c
seg.c: In function ‘f’:
seg.c:3:6: internal compiler error: Segmentation fault
 void f(unsigned p)
      ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to