User account creation filtered due to spam.

Bug 55412 - pr47276.c fails with -fpic option.
Summary: pr47276.c fails with -fpic option.
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-20 10:57 UTC by Alexander Ivchenko
Modified: 2013-11-10 08:23 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Simple reproducer (236 bytes, application/octet-stream)
2012-11-21 07:46 UTC, Alexander Ivchenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Ivchenko 2012-11-20 10:57:07 UTC
When trying to compile pr47276.c with additional -fpic option I've got the following error:

pr47276.c:36:1: warning: asm declaration ignored due to conflict with previous rename [-Wpragmas]
 extern __typeof (__vsyslog_chk) __vsyslog_chk __asm__ ("" ASMNAME ("__GI___vsyslog_chk")) __attribute__ ((visibility ("hidden")));
 ^
../../../../gcc/gcc/testsuite/gcc.dg/pr47276.c:25:123: error: ‘__EI___vsyslog_chk’ aliased to undefined symbol ‘__GI___vsyslog_chk’
 extern __typeof (__vsyslog_chk) __EI___vsyslog_chk __asm__("" ASMNAME ("__vsyslog_chk")); extern __typeof (__vsyslog_chk) __EI___vsyslog_chk __attribute__((alias ("" "__GI___vsyslog_chk")));
Comment 1 Jakub Jelinek 2012-11-20 12:15:01 UTC
This fails all the way back to gcc 4.0 this way, and given that glibc itself builds fine even with gcc 4.7, I assume the testcase just doesn't match what glibc contained accurately.
Comment 2 Alexander Ivchenko 2012-11-21 07:46:20 UTC
Created attachment 28751 [details]
Simple reproducer
Comment 3 Alexander Ivchenko 2012-11-21 07:48:23 UTC
I tried to narrow down the problem and changed the test a little bit.
(The relative order of declarations remains the same; Just grouped the coupled declarations)
This changed test passes with -fno-pic and fails with -fpic.

BUT if we comment out the first group of definition/declarations
the test will fail with -fno-pic with the same problem, eventhough
those two groups are completely independent of each other

test case is attached in the previous comment