[LLVMbugs] [Bug 10588] New: New llvm type system breaks types definitions in C backend

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Aug 4 08:51:15 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10588

           Summary: New llvm type system breaks types definitions in C
                    backend
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: maemarcus at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=7017)
 --> (http://llvm.org/bugs/attachment.cgi?id=7017)
axpy Fortran test case

Before new type system, C backend was able to generate intermediate typedefs
even for anonymous types and use them elsewhere in code, instead of inline
definitions. Now, after dragonegg/CBackend have been stabilized with new type
system, we see a lot of inline type definitions, that are failing to compile.

Please see a simple test case attached. Commands to execute:

/opt/llvm/dragonegg/bin/dragonegg-gfortran -c axpy.f90 -ffree-line-length-none
-fplugin=/opt/llvm/dragonegg/lib64/dragonegg.so -O0 -S
-fplugin-arg-dragonegg-emit-ir -o axpy.f90.bc
/opt/llvm/bin/llc -march=c axpy.f90.bc -o axpy.f90.c
gcc axpy.f90.c

Result:

axpy.f90.c:119:35: error: expected identifier or ‘(’ before ‘{’ token
axpy.f90.c:129:31: error: expected identifier or ‘(’ before ‘{’ token
axpy.f90.c:169:57: error: expected declaration specifiers or ‘...’ before ‘(’
token
axpy.f90.c:169:92: error: expected declaration specifiers or ‘...’ before ‘(’
token
axpy.f90.c:178:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token
axpy.f90.c:179:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token
axpy.f90.c:183:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token
axpy.f90.c:183:44: error: expected identifier or ‘(’ before ‘=’ token
axpy.f90.c:184:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token
axpy.f90.c:184:46: error: expected identifier or ‘(’ before ‘=’ token
axpy.f90.c:203:57: error: expected declaration specifiers or ‘...’ before ‘(’
token
axpy.f90.c:203:92: error: expected declaration specifiers or ‘...’ before ‘(’
token

-- 
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