[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/23350] New: multiple prevailing defs for unused variable in lto
From: |
mliska at suse dot cz |
Subject: |
[Bug ld/23350] New: multiple prevailing defs for unused variable in lto mode |
Date: |
Thu, 28 Jun 2018 12:50:06 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=23350
Bug ID: 23350
Summary: multiple prevailing defs for unused variable in lto
mode
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: mliska at suse dot cz
Target Milestone: ---
Consider:
$ cat a.i
int wrl;
int main()
{
}
$ cat b.i
int wrl;
int wrl2;
$ cc -flto -O2 -c a.i
$ cc -flto -O2 -c b.i
$ ar rusc libpes.a b.o
$ cc a.o libpes.a libpes.a
lto1: fatal error: multiple prevailing defs for ‘wrl2’
compilation terminated.
lto-wrapper: fatal error: cc returned 1 exit status
compilation terminated.
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: error:
lto-wrapper failed
collect2: error: ld returned 1 exit status
Where .res file looks as follows:
$ cat libpes.res
3
a.o 2
190 c40a787b82fa11ab PREVAILING_DEF main
194 c40a787b82fa11ab PREVAILING_DEF_IRONLY wrl
address@hidden 2
188 8e139599392dae30 PREVAILING_DEF_IRONLY wrl2
190 8e139599392dae30 RESOLVED_IR wrl
address@hidden 2
188 8e139599392dae30 PREVAILING_DEF_IRONLY wrl2
190 8e139599392dae30 RESOLVED_IR wrl
While gold is fine, having following resolution file:
$ cat libpes.res
1
a.o 2
190 c40a787b82fa11ab PREVAILING_DEF main
194 c40a787b82fa11ab PREVAILING_DEF_IRONLY wrl
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/23350] New: multiple prevailing defs for unused variable in lto mode,
mliska at suse dot cz <=