[Bug tree-optimization/57358] New: segmentation fault with attribute(optimize(O0))

nbkolchin at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue May 21 15:17:00 GMT 2013


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

            Bug ID: 57358
           Summary: segmentation fault with attribute(optimize(O0))
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nbkolchin at gmail dot com

Created attachment 30157
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30157&action=edit
backtrace

The following code crashes GCC (gcc-4.8.0 -O2):

typedef void (*done)(void* arg);
struct t { done func; void* arg; };
static void test_func() __attribute__((optimize("O0")));                       
  static void test_func(struct t* a)
{
  a->func(a->arg);
}

Program received signal SIGSEGV, Segmentation fault.
walk_aliased_vdefs_1 (ref=ref@entry=0x7fffffffda70, vdef=0x0,
    walker=0x6f5d90 <mark_modified(ao_ref*, tree, void*)>, data=0x7fffffffda5f,
    visited=0x7fffffffda28, cnt=0)
    at /mnt/work/oktet/transas/sources/4.8/gcc/gcc/tree-ssa-alias.c:2196
2196          gimple def_stmt = SSA_NAME_DEF_STMT (vdef);

Backtrace from gdb attached.

Reproducable with custom GCC build and gentoo 4.8. No error in 4.7.



More information about the Gcc-bugs mailing list