This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/42923] New: ice: verify_stmts failed


regehr@john-home:~/volatile/bugs/tmp264$ current-gcc -c -O2 small.c
small.c: In function ?node_get_length?:
small.c:33:1: error: type mismatch in binary expression
int

int

size_t

add_acc.0_12 = add_acc.0_4 + D.1984_13;

small.c:33:1: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

regehr@john-home:~/volatile/bugs/tmp264$ cat small.c

typedef unsigned size_t;
size_t strlen(const char *s);

typedef struct _Record
{
  char *name;
} Record;

typedef struct _Node
{
  char type;
  union
  {
    struct
    {
      Record *record;
      struct _Node *child;
    }
    function;
  }
  data;
} Node;

int node_get_length (Node * node)
{
  switch (node->type)
    {
    case 'f':
      return strlen (node->data.function.record->name) + 1 +
        node_get_length (node->data.function.child) + 1;
    }
  return 0;
}

regehr@john-home:~/volatile/bugs/tmp264$ current-gcc -v

Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/home/regehr/z/tmp/gcc-r156428-install/libexec/gcc/i686-pc-linux-gnu/4.5.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto
--prefix=/home/regehr/z/tmp/gcc-r156428-install --program-prefix=r156428-
--enable-languages=c,c++
Thread model: posix
gcc version 4.5.0 20100201 (experimental) (GCC)


-- 
           Summary: ice: verify_stmts failed
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: regehr at cs dot utah dot edu
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]