[LLVMbugs] [Bug 2292] New: tree check failure inlining pure function

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue May 6 03:48:34 PDT 2008


           Summary: tree check failure inlining pure function
           Product: new-bugs
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: baldrick at free.fr
                CC: llvmbugs at cs.uiuc.edu

This testcase

__inline__ __attribute__ ((__pure__)) int g (void) {}
void f (int k) { k = g (); }

crashes llvm-gcc at -O2 on x86-32 linux:

$ gcc -c -O2 dwv.c
dwv.c: In function 'f':
dwv.c:2: internal compiler error: tree check: expected tree that contains 'decl
with visibility' structure, have 'parm_decl'  in declare_return_variable, at

Curiously the compiler doesn't crash on x86-64 linux.  However
I see the same failing tree check for several Ada testcases on
x86-64 which pass happily on x86-32.

The relevant code snippet is:

    /* LLVM LOCAL begin */
    /* The return node can suddenly become multiple assignment.  Because of
     * conservatively don't consider this thing for SSA form anymore.
    if (DECL_P (var))
      DECL_GIMPLE_FORMAL_TEMP_P (var) = 0;
    /* LLVM LOCAL end */

The check fails on the assignment.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list