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

           Summary: C backend emits incorrect declarations/definitions of
                    global arrays
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


(This works in 2.9, but is broken in top-of-tree.)

% echo "float foo[4];" | clang -x c++ -c - -emit-llvm -o - | llc -march=c -o -
| clang -c -x c - -o /dev/null

<stdin>:112:8: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
extern foo { float array[4]; };
~~~~~~ ^
<stdin>:112:11: error: expected ';' after top level declarator
extern foo { float array[4]; };
          ^
          ;
<stdin>:122:8: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
extern foo { float array[4]; };
~~~~~~ ^
<stdin>:122:11: error: expected ';' after top level declarator
extern foo { float array[4]; };
          ^
          ;
<stdin>:126:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
foo { float array[4]; };
^~~
<stdin>:126:4: error: expected ';' after top level declarator
foo { float array[4]; };
   ^
   ;
3 warnings and 3 errors generated.

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to