-g and compiling via assembly fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
binutils |
Fix Released
|
Medium
|
|||
binutils (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
gcc-4.3 (Debian) |
Fix Released
|
Unknown
|
Bug Description
Binary package hint: gcc-4.3
When attempting to merge the darcs package from Debian, I stumbled across the following bug in gcc-4.3.
A similar bug is reported on the BTS as debian bug #481592. There it only affects the IA64 architecture, but in Intrepid I'm seeing it on amd64, i386 and lpia.
Test case and error taken from the above bug:
echo -e '#include "test2.h"\nint main (int argc, char** argv) {callme(); return 1;}' > test2.c
echo 'int callme() {}' > test2.h
gcc -S -g test2.c -o test2.s; gcc test2.s -o test2 -g
Results in the error:
gcc -S -g test2.c -o test2.s; gcc test2.s -o test2 -g
test2.s: Assembler messages:
test2.s:31: Error: file number 2 already allocated
Failed build logs for darcs in my PPA:
amd64 - https:/
i386 - https:/
lpia - https:/
Thanks.
Changed in gcc-4.3: | |
status: | Unknown → New |
Changed in binutils: | |
status: | New → Confirmed |
Changed in binutils: | |
status: | Unknown → Confirmed |
Changed in binutils: | |
status: | Confirmed → Invalid |
Changed in binutils: | |
status: | Invalid → Fix Released |
Changed in binutils: | |
status: | Invalid → In Progress |
Changed in gcc-4.3: | |
status: | New → Confirmed |
Changed in binutils: | |
importance: | Unknown → Medium |
Changed in gcc-4.3 (Debian): | |
status: | Confirmed → Fix Released |
seen with current trunk, not with the 2.18 branch, testcase taken from the darcs
configury.
echo -e '#include "test2.h"\nint main (int argc, char** argv) {callme(); return
1;}' > test2.c
echo 'int callme() {}' > test2.h
gcc -S -g test2.c -o test2.s; gcc test2.s -o test2 -g
test2.s: Assembler messages:
test2.s:31: Error: file number 2 already allocated
omitting the -g for the linking avoids the error.