http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60535

            Bug ID: 60535
           Summary: [4.9 Regression] Link failure with -flto and
                    -fsanitize=undefined
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org

Created attachment 32359
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32359&action=edit
unreduced testcase

Trying to build Firefox with -flto and -fsanitize=undefined fails:

markus@x4 libopus % g++ -fsanitize=undefined -flto -O2 jskwgen.ii
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
column_comparator(void const*, void const*): error: undefined reference to
'.Lubsan_data0.3163'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
column_comparator(void const*, void const*): error: undefined reference to
'.Lubsan_data3.3217'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
column_comparator(void const*, void const*): error: undefined reference to
'.Lubsan_data2.3199'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
column_comparator(void const*, void const*): error: undefined reference to
'.Lubsan_data1.3181'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
length_comparator(void const*, void const*): error: undefined reference to
'.Lubsan_data6.3285'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
length_comparator(void const*, void const*): error: undefined reference to
'.Lubsan_data5.3266'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
length_comparator(void const*, void const*): error: undefined reference to
'.Lubsan_data4.3248'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function p(gen_opt*, char
const*, ...): error: undefined reference to '.Lubsan_data7.3311'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function indent(gen_opt*):
error: undefined reference to '.Lubsan_data8.3344'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function indent(gen_opt*):
error: undefined reference to '.Lubsan_data9.3362'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function line(gen_opt*, char
const*, ...): error: undefined reference to '.Lubsan_data10.3389'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function line(gen_opt*, char
const*, ...): error: undefined reference to '.Lubsan_data11.3407'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function qchar(char, char*):
error: undefined reference to '.Lubsan_data14.3475'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function qchar(char, char*):
error: undefined reference to '.Lubsan_data12.3439'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function qchar(char, char*):
error: undefined reference to '.Lubsan_data21.3601'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function qchar(char, char*):
error: undefined reference to '.Lubsan_data20.3583'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function qchar(char, char*):
error: undefined reference to '.Lubsan_data19.3565'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function qchar(char, char*):
error: undefined reference to '.Lubsan_data13.3457'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function qchar(char, char*):
error: undefined reference to '.Lubsan_data18.3547'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function qchar(char, char*):
error: undefined reference to '.Lubsan_data17.3529'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function qchar(char, char*):
error: undefined reference to '.Lubsan_data16.3511'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function qchar(char, char*):
error: undefined reference to '.Lubsan_data15.3493'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data23.3723'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data43.4083'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data44.4101'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data45.4119'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data46.4137'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data47.4155'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data48.4173'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data49.4191'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data50.4209'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data51.4227'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data52.4245'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data53.4263'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data54.4281'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data35.3939'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data34.3921'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data33.3903'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data32.3885'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data22.3705'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data31.3867'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data39.4011'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data42.4065'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data30.3849'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data29.3831'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data28.3813'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data27.3795'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data26.3777'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data25.3759'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function
generate_letter_switch_r(gen_opt*, unsigned int*, unsigned int, unsigned int*,
unsigned int): error: undefined reference to '.Lubsan_data24.3741'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function main: error:
undefined reference to '.Lubsan_data59.4465'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function main: error:
undefined reference to '.Lubsan_data65.4573'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function main: error:
undefined reference to '.Lubsan_data60.4483'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function main: error:
undefined reference to '.Lubsan_data57.4429'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function main: error:
undefined reference to '.Lubsan_data56.4411'
/tmp/ccMC55Z1.ltrans0.ltrans.o:ccMC55Z1.ltrans0.o:function main: error:
undefined reference to '.Lubsan_data55.4393'
collect2: error: ld returned 1 exit status

Reply via email to