public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: David Decotigny <David.Decotigny@irisa.fr>
To: gcc-gnats@gcc.gnu.org
Subject: middle-end/6697: __attribute__((section ("name"))) unjustified (?) conflicts
Date: Fri, 17 May 2002 08:46:00 -0000	[thread overview]
Message-ID: <200205171539.RAA10713@blutch.irisa.fr> (raw)


>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:


                 reply	other threads:[~2002-05-17 15:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200205171539.RAA10713@blutch.irisa.fr \
    --to=david.decotigny@irisa.fr \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).