[Bug c/83960] New: Bad assembler with debug and LTO
simon at pushface dot org
gcc-bugzilla@gcc.gnu.org
Sun Jan 21 20:22:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83960
Bug ID: 83960
Summary: Bad assembler with debug and LTO
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: simon at pushface dot org
Target Milestone: ---
Host: x86_64-apple-darwin15
Target: x64_64-apple-darwin15
Build: x86_64-apple-darwin15
Fails at r256927 (and previously, I now find, at r255748) with -g -flto.
For empty.c,
int main(void)
{
return 0;
}
this is OK:
$ gcc -flto empty.c
but this fails:
$ gcc -g -flto empty.c
/var/folders/_q/fvnxz46903z9hjh38fz0lyhm0000gs/T//ccYrmduC.s:93:8: error:
unsupported relocation with subtraction expression, symbol '_empty.c.8f1a73ad'
can not be undefined in a subtraction expression
.quad _empty.c.8f1a73ad-Lsection__debug_info+11
^
/var/folders/_q/fvnxz46903z9hjh38fz0lyhm0000gs/T//ccYrmduC.s:95:8: error:
unsupported relocation with subtraction expression, symbol '_empty.c.8f1a73ad'
can not be undefined in a subtraction expression
.quad _empty.c.8f1a73ad-Lsection__debug_info+182
^
lto-wrapper: fatal error: /opt/gcc-8.0.0/bin/gcc returned 1 exit status
compilation terminated.
collect2: fatal error: lto-wrapper returned 1 exit status
compilation terminated.
Compiler built with
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/Volumes/Miscellaneous/tmp/opt/gcc-8.0.0/libexec/gcc/x86_64-apple-darwin15/8.0.1/lto-wrapper
Target: x86_64-apple-darwin15
Configured with: ../gcc/configure
--prefix=/Volumes/Miscellaneous/tmp/opt/gcc-8.0.0 --without-libiconv-prefix
--disable-libmudflap --disable-libstdcxx-pch --disable-libsanitizer
--disable-libcc1 --disable-libcilkrts --disable-multilib --disable-nls
--enable-languages=c,c++,ada --build=x86_64-apple-darwin15
Thread model: posix
gcc version 8.0.1 20180121 (experimental) (GCC)
and failure happens on Darwin 17 as well as 15 (I don’t have a Darwin 16
machine).
Failure happens the same way when building Ada programs.
More information about the Gcc-bugs
mailing list