[LLVMbugs] [Bug 10617] New: C backend emits incorrect declarations/definitions of global arrays
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Aug 9 06:01:48 PDT 2011
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: unassignedbugs at nondot.org
ReportedBy: matt at pharr.org
CC: llvmbugs at cs.uiuc.edu
(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.
More information about the llvm-bugs
mailing list