public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* middle-end/6697: __attribute__((section ("name"))) unjustified (?) conflicts
@ 2002-05-17 8:46 David Decotigny
0 siblings, 0 replies; only message in thread
From: David Decotigny @ 2002-05-17 8:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 6697
>Category: middle-end
>Synopsis: Unjustified (?) __attribute__ section conflicts
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Fri May 17 08:46:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: David Decotigny
>Release: 3.1
>Organization:
IRISA, Campus de Beaulieu, 35042 Rennes Cedex, FRANCE
>Environment:
System: SunOS blutch 5.7 Generic_106541-15 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4
host: sparc-sun-solaris2.7
build: sparc-sun-solaris2.7
target: i586-pc-gnu
configured with: ./configure --prefix=/udd/ddecotig/xgcc/host-sparc-solaris7/stow/gcc-3.1 --enable-long-long --enable-languages=c,c++ --disable-nls --disable-shared --with-as=/udd/ddecotig/xgcc/host-sparc-solaris7/bin/i586-gnu-as --with-gnu-as --with-ld=/udd/ddecotig/xgcc/host-sparc-solaris7/bin/i586-gnu-ld --with-gnu-ld --host=sparc-sun-solaris2.7 -v i586-gnu
>Description:
When defining variables/functions sections using __attribute__, gcc
becomes very subtle : it refuses to put two slightly different
variables (incompatible ?) in the same section => "X causes a section
type conflict". It worked perfectly well with gcc-3.0.
I may be wrong in using the section __attribute__, but the doc does
not tell how to correctly specify a type for a section at compile
time (should I switch to "asm" directly ?).
>How-To-Repeat:
Example 1:
/* "BUG" (?) : "p causes a section type conflict"
remove the 'const' before int i, and it works */
const int *p __attribute__((section("foo")));
const int i __attribute__((section("foo"))) = 0;
Example 2:
/* "BUG" (?) : "bar causes a section type conflict"
remove the f definition and it works */
__attribute__((section("foo"))) int bar[3];
__attribute__((section("foo"))) void f() {}
/* Or:
void f(void) __attribute__((section("foo")));
void f(void) {}
*/
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-05-17 15:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-17 8:46 middle-end/6697: __attribute__((section ("name"))) unjustified (?) conflicts David Decotigny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).