public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/10670] gcc ignors 'pragma Machine_Attribute' directive
[not found] <20030507200600.10670.berndtrog@yahoo.com>
@ 2003-05-26 14:43 ` pinskia@physics.uc.edu
2003-07-29 14:50 ` pinskia at physics dot uc dot edu
` (8 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: pinskia@physics.uc.edu @ 2003-05-26 14:43 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10670
pinskia@physics.uc.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-05-26 14:31:02
date| |
------- Additional Comments From pinskia@physics.uc.edu 2003-05-26 14:31 -------
See Dara's comment.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug ada/10670] gcc ignors 'pragma Machine_Attribute' directive
[not found] <20030507200600.10670.berndtrog@yahoo.com>
2003-05-26 14:43 ` [Bug ada/10670] gcc ignors 'pragma Machine_Attribute' directive pinskia@physics.uc.edu
@ 2003-07-29 14:50 ` pinskia at physics dot uc dot edu
2003-10-21 15:37 ` charlet at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-29 14:50 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10670
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug ada/10670] gcc ignors 'pragma Machine_Attribute' directive
[not found] <20030507200600.10670.berndtrog@yahoo.com>
2003-05-26 14:43 ` [Bug ada/10670] gcc ignors 'pragma Machine_Attribute' directive pinskia@physics.uc.edu
2003-07-29 14:50 ` pinskia at physics dot uc dot edu
@ 2003-10-21 15:37 ` charlet at gcc dot gnu dot org
2003-10-21 17:04 ` berndtrog at yahoo dot com
` (6 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: charlet at gcc dot gnu dot org @ 2003-10-21 15:37 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10670
charlet at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
------- Additional Comments From charlet at gcc dot gnu dot org 2003-10-21 15:33 -------
What would be the C equivalent of your Ada code ?
Could you file a C program ?
Arno
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug ada/10670] gcc ignors 'pragma Machine_Attribute' directive
[not found] <20030507200600.10670.berndtrog@yahoo.com>
` (2 preceding siblings ...)
2003-10-21 15:37 ` charlet at gcc dot gnu dot org
@ 2003-10-21 17:04 ` berndtrog at yahoo dot com
2003-10-27 16:27 ` gnat-dev at buzco dot nyct dot net
` (5 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: berndtrog at yahoo dot com @ 2003-10-21 17:04 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10670
berndtrog at yahoo dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
------- Additional Comments From berndtrog at yahoo dot com 2003-10-21 17:04 -------
That should be the C equivalent of my Ada code:
void
boot (void) __attribute__ ((section (".bootloader")));
void
boot (void)
{
puts ("Boot\n");
}
int main(void)
{
puts ("Test\n");
}
>objdump -h bootloader.o
bootloader.o: file format elf32-i386
Sections:
Idx Name Size VMA LMA File off Algn
[..]
12 .bootloader 00000014 08048400 08048400 00000400 2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
[..]
Release:
gcc version 3.3 20030127 (prerelease)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug ada/10670] gcc ignors 'pragma Machine_Attribute' directive
[not found] <20030507200600.10670.berndtrog@yahoo.com>
` (3 preceding siblings ...)
2003-10-21 17:04 ` berndtrog at yahoo dot com
@ 2003-10-27 16:27 ` gnat-dev at buzco dot nyct dot net
2003-10-28 12:05 ` berndtrog at yahoo dot com
` (4 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: gnat-dev at buzco dot nyct dot net @ 2003-10-27 16:27 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10670
------- Additional Comments From gnat-dev at buzco dot nyct dot net 2003-10-27 16:25 -------
Please, where in the LRM is a pragma Machine_Attribute() mentioned. Please
submit some sample test code that breaks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug ada/10670] gcc ignors 'pragma Machine_Attribute' directive
[not found] <20030507200600.10670.berndtrog@yahoo.com>
` (4 preceding siblings ...)
2003-10-27 16:27 ` gnat-dev at buzco dot nyct dot net
@ 2003-10-28 12:05 ` berndtrog at yahoo dot com
2003-11-01 4:53 ` gnat-dev at buzco dot nyct dot net
` (3 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: berndtrog at yahoo dot com @ 2003-10-28 12:05 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10670
------- Additional Comments From berndtrog at yahoo dot com 2003-10-28 11:57 -------
> Please, where in the LRM is a pragma Machine_Attribute() mentioned.
It's an implementation defined pragma:
http://gcc.gnu.org/onlinedocs/gnat_rm/Implementation-Defined-Pragmas.
html#Implementation%20Defined%20Pragmas
> Please submit some sample test code that breaks.
I've already submitted an example at the time when I opened this PR on
2003-05-07.
BTW, Geert Bosch wrote a comment on this issue in:
http://gcc.gnu.org/ml/gcc/2003-05/msg00703.html
HTH,
Bernd
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug ada/10670] gcc ignors 'pragma Machine_Attribute' directive
[not found] <20030507200600.10670.berndtrog@yahoo.com>
` (5 preceding siblings ...)
2003-10-28 12:05 ` berndtrog at yahoo dot com
@ 2003-11-01 4:53 ` gnat-dev at buzco dot nyct dot net
2004-02-11 20:52 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: gnat-dev at buzco dot nyct dot net @ 2003-11-01 4:53 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10670
------- Additional Comments From gnat-dev at buzco dot nyct dot net 2003-11-01 04:53 -------
Subject: Re: gcc ignors 'pragma Machine_Attribute' directive
: r! uname -a
Linux buzco.nyct.net 2.2.16 #6 Sat Oct 26 10:26:53 EDT 2002 i586 unknown
: r! gcc --version
gcc (GCC) 3.3.2
On 03-10-28 11:57:49, berndtrog at yahoo dot com wrote:
| > Please, where in the LRM is a pragma Machine_Attribute() mentioned.
| It's an implementation defined pragma:
| http://gcc.gnu.org/onlinedocs/gnat_rm/Implementation-Defined-Pragmas.
| html#Implementation%20Defined%20Pragmas
OK, gotcha, should have thought of that before asking.
Except that that documentation +may+ have been correct for GNAT-3.x
based on gcc-2.8.1 but is wrong for GCC-3.x.
: This pragma is semantically equivalent to
: __attribute__((string_expression)) in GNU C, where string_expression
: is recognized by the GNU C macros VALID_MACHINE_TYPE_ATTRIBUTE and
: VALID_MACHINE_DECL_ATTRIBUTE which are defined in the configuration
: header file tm.h for each machine.
But the only place these macros are mentioned in current code are:
: /* Old target macros that have moved to the target hooks structure. */
: #pragma GCC poison ASM_OPEN_PAREN ASM_CLOSE_PAREN \
: [ ... ]
: VALID_MACHINE_DECL_ATTRIBUTE VALID_MACHINE_TYPE_ATTRIBUTE \
: [ ... ]
| > Please submit some sample test code that breaks.
| I've already submitted an example at the time when I opened this PR on
| 2003-05-07.
Yeah, new at this "bugzilla" thing and missed it.
| BTW, Geert Bosch wrote a comment on this issue in:
| http://gcc.gnu.org/ml/gcc/2003-05/msg00703.html
Yah, and he had a syntax error that didn't seem to be caught.
=== End quoted text ===
OK, bug verified as of this date w/ following stuff:
-- TITLE :
-- LANGUAGE : Ada
-- MODULE : Boot_A
-- COMPONENT OF : BuZco Software (Gazelle)
-- PARENT ORGANIZATION : BuzCo Systems
-- LATEST AUTHOR : Buz Cory
-- $RCSfile$
-- $Revision$
-- $Date$
-- --------------------------------------------------------------------
-- EXTERNAL MODULES USED
-- --------------------------------------------------------------------
-- PURPOSE :
-- --------------------------------------------------------------------
-- OVERVIEW:
-- --------------------------------------------------------------------
-- NOTICES, LICENSE follow; NOTES, HISTORY at end
-- ----------------------------------------
-- This software is part of the Gazelle suite of useful,
-- [ snip boilerplate :) ]
procedure
Boot_A ;
pragma Machine_Attribute
( Entity => Boot_A
, Attribute_Name => "section ("".bootloader"")"
) ;
-- TITLE :
-- LANGUAGE : Ada
-- MODULE : Boot_A
-- COMPONENT OF : BuZco Software (Gazelle)
-- PARENT ORGANIZATION : BuzCo Systems
-- LATEST AUTHOR : Buz Cory
-- $RCSfile$
-- $Revision$
-- $Date$
-- --------------------------------------------------------------------
-- EXTERNAL MODULES USED
with Gazelle ;
-- --------------------------------------------------------------------
-- PURPOSE :
-- --------------------------------------------------------------------
-- OVERVIEW:
-- --------------------------------------------------------------------
procedure Boot_A
is
body_RCSid : aliased constant Gazelle .RCS_String :=
"$Id$"
;
begin
null ;
end Boot_A ;
> : /usr/bin/gnatmake [ ... ] -c boot_a.adb
> : gcc -c [ ... ] boot_a.adb
> boot_a.ads:49: warning: `section (".bootloader")' attribute directive ignored
And similarly for :
pragma Linker_Section
( Entity => Boot_A_L
, Section => ".bootloader"
) ;
> : r! make boot_a_l.o
> /usr/bin/gnatmake [ ... ] -c boot_a_l.adb
> gcc -c [ ... ] boot_a_l.adb
> boot_a_l.adb:52:05: warning: constant "body_RCSid" is not referenced
> boot_a_l.ads:53:18: warning: section attributes are not supported for
> boot_a_l.ads:53:18: warning: this target
But :
> void boot(void) __attribute__ ((section (".bootloader"))) ;
> void boot(void)
> {
> int a ;
> a = a++ ;
> }
> : r! objdump -h boot_c.o
> Yields :
> boot_c.o: file format elf32-i386
> Sections:
> Idx Name Size VMA LMA File off Algn
> [ ... ]
> 3 .bootloader 00000013 00000000 00000000 00000034 2**0
> CONTENTS, ALLOC, LOAD, READONLY, CODE
and finally, the message for "attribute directive ignored" appears only
one place in the code, in gcc/attribs.c.
My best guess at the moment is that this is a +boundary+ (API) problem.
What the back end expects in 3.x is different from 2.8.x and the front
end failed to change w/ it.
I expect to follow this up more as soon as I get a visual debugger that
knows Ada working w/ the new object format.
It would please to be assigned to this bug.
--
Buz Cory of BuzCo Systems -- New York NY USA http://BuzCo.nyct.net
<gnat-dev@BuzCo.nyct.net> (Buz as GNAT Programmer)
write to <helpdesk@BuzCo.nyct.net> for FREE help with:
Installing/Configuring Linux
Getting started with the Ada Programming Language.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug ada/10670] gcc ignors 'pragma Machine_Attribute' directive
[not found] <20030507200600.10670.berndtrog@yahoo.com>
` (6 preceding siblings ...)
2003-11-01 4:53 ` gnat-dev at buzco dot nyct dot net
@ 2004-02-11 20:52 ` pinskia at gcc dot gnu dot org
2004-11-26 15:23 ` pinskia at gcc dot gnu dot org
2005-03-31 8:16 ` [Bug ada/10670] 'section' Machine_Attribute directive ignored ebotcazou at gcc dot gnu dot org
9 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-11 20:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-11 20:52 -------
*** Bug 14115 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10670
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug ada/10670] gcc ignors 'pragma Machine_Attribute' directive
[not found] <20030507200600.10670.berndtrog@yahoo.com>
` (7 preceding siblings ...)
2004-02-11 20:52 ` pinskia at gcc dot gnu dot org
@ 2004-11-26 15:23 ` pinskia at gcc dot gnu dot org
2005-03-31 8:16 ` [Bug ada/10670] 'section' Machine_Attribute directive ignored ebotcazou at gcc dot gnu dot org
9 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-26 15:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-26 15:23 -------
*** Bug 18680 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10670
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug ada/10670] 'section' Machine_Attribute directive ignored
[not found] <20030507200600.10670.berndtrog@yahoo.com>
` (8 preceding siblings ...)
2004-11-26 15:23 ` pinskia at gcc dot gnu dot org
@ 2005-03-31 8:16 ` ebotcazou at gcc dot gnu dot org
9 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-03-31 8:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2005-03-31 08:16 -------
'section' is not a machine attribute, it's an attribute of C-like languages.
The compiler is correct in rejecting it. Use pragma Linker_Section instead.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
Status|NEW |RESOLVED
Keywords|wrong-code |
Resolution| |INVALID
Summary|gcc ignors 'pragma |'section' Machine_Attribute
|Machine_Attribute' directive|directive ignored
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10670
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-03-31 8:16 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20030507200600.10670.berndtrog@yahoo.com>
2003-05-26 14:43 ` [Bug ada/10670] gcc ignors 'pragma Machine_Attribute' directive pinskia@physics.uc.edu
2003-07-29 14:50 ` pinskia at physics dot uc dot edu
2003-10-21 15:37 ` charlet at gcc dot gnu dot org
2003-10-21 17:04 ` berndtrog at yahoo dot com
2003-10-27 16:27 ` gnat-dev at buzco dot nyct dot net
2003-10-28 12:05 ` berndtrog at yahoo dot com
2003-11-01 4:53 ` gnat-dev at buzco dot nyct dot net
2004-02-11 20:52 ` pinskia at gcc dot gnu dot org
2004-11-26 15:23 ` pinskia at gcc dot gnu dot org
2005-03-31 8:16 ` [Bug ada/10670] 'section' Machine_Attribute directive ignored ebotcazou at gcc dot gnu dot org
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).