Source code:
int *insert_automaton_decl (void **entry_ptr, int * automaton_decl)
{
  if (*entry_ptr == ((void *)0))
    *entry_ptr = (void *) automaton_decl;
  return (int*) *entry_ptr;
}
-----
Error message:
t1.c: In function ‘insert_automaton_decl’:
t1.c:2: error: statement types mismatch
#   VUSE <TMT.4D.1900_9>;
storetmp.21D.1918_11 = *entry_ptrD.1886_1;

intD.0 *
voidD.38 *
t1.c:2: internal compiler error: verify_stmts failed

------ the tree dump:
  void * prephitmp.22;
  int * storetmp.21;
  int * D.1891;
  void * D.1890;

<bb 2>:
  D.1890_2 = *entry_ptr_1;
  if (D.1890_2 == 0B) goto <L0>; else goto <L3>;

<L3>:;
  goto <bb 4> (<L1>);

<L0>:;
  *entry_ptr_1 = automaton_decl_6;
  storetmp.21_11 = *entry_ptr_1;

  # prephitmp.22_12 = PHI <D.1890_2(5), storetmp.21_11(3)>;
<L1>:;
  D.1890_3 = prephitmp.22_12;
  D.1891_4 = (int *) D.1890_3;
  return D.1891_4;


Why is storetmp.21 an int* and not a void*?

I will look into this more later today.

Reduced genautomata.c


-- 
           Summary: load PRE creates type mismatches
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
OtherBugsDependingO 22368
             nThis:


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

Reply via email to