public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41209] New: Add full ATTRIBUTE support to gfortran (ALIGN, (WEAK)ALIAS, ...)
@ 2009-09-01 9:35 burnus at gcc dot gnu dot org
2009-09-01 13:30 ` [Bug fortran/41209] " burnus at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-09-01 9:35 UTC (permalink / raw)
To: gcc-bugs
gfortran currently supports only STDCALL, FASTCALL and CDECL as attributes
using
!GCC$ ATTRIBUTE <list> :: symbol
The attributes are saved as bit in the attr struct. For full attribute support,
one presumably should save the string and convert it later in trans*.c into a
TREE.
The string should then be saved in the .mod file. (That is also the reason that
one cannot directly save the attributes into a TREE.)
Issue: For STDCALL etc. we do some conformance checking for proc-pointer
assignments. That should continue to work. Maybe one needs to do further
checks.
See:
http://gcc.gnu.org/onlinedocs/gfortran/GNU-Fortran-Compiler-Directives.html
http://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
PR 34112 and PR 40955
--
Summary: Add full ATTRIBUTE support to gfortran (ALIGN,
(WEAK)ALIAS, ...)
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41209
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/41209] Add full ATTRIBUTE support to gfortran (ALIGN, (WEAK)ALIAS, ...)
2009-09-01 9:35 [Bug fortran/41209] New: Add full ATTRIBUTE support to gfortran (ALIGN, (WEAK)ALIAS, ...) burnus at gcc dot gnu dot org
@ 2009-09-01 13:30 ` burnus at gcc dot gnu dot org
2009-09-01 17:39 ` burnus at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-09-01 13:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2009-09-01 13:29 -------
As fun one can think of supporting also alignment within a TYPE, similarly to
C's:
struct foo { int x[2] __attribute__ ((aligned (8))); };
See http://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html for details.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41209
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/41209] Add full ATTRIBUTE support to gfortran (ALIGN, (WEAK)ALIAS, ...)
2009-09-01 9:35 [Bug fortran/41209] New: Add full ATTRIBUTE support to gfortran (ALIGN, (WEAK)ALIAS, ...) burnus at gcc dot gnu dot org
2009-09-01 13:30 ` [Bug fortran/41209] " burnus at gcc dot gnu dot org
@ 2009-09-01 17:39 ` burnus at gcc dot gnu dot org
2009-12-04 23:33 ` dfranke at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-09-01 17:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2009-09-01 17:39 -------
Created an attachment (id=18463)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18463&action=view)
Draft patch - first steps but incomplete & will not work
Draft patch (not really work yet).
TODO:
a) Copy attributes properly and free them at the end
b) Write/read them from the .mod file
c) Use an ENUM for stdcall etc.? Requires a check whether they are already set
but those options are orthogonal thus that makes sense.
TODO 2: Check whether derived types are properly handled: bind(C) vs. sequence
vs. extensible types. And attributes to components vs. attributes to the type
as a whole.
Plus checking whether we set some attributes by default which clash with user
settings.
Plus: Are additional front-end checks needed besides stdcall etc. conformance
for proc-pointers?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41209
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/41209] Add full ATTRIBUTE support to gfortran (ALIGN, (WEAK)ALIAS, ...)
2009-09-01 9:35 [Bug fortran/41209] New: Add full ATTRIBUTE support to gfortran (ALIGN, (WEAK)ALIAS, ...) burnus at gcc dot gnu dot org
2009-09-01 13:30 ` [Bug fortran/41209] " burnus at gcc dot gnu dot org
2009-09-01 17:39 ` burnus at gcc dot gnu dot org
@ 2009-12-04 23:33 ` dfranke at gcc dot gnu dot org
2010-02-18 16:19 ` burnus at gcc dot gnu dot org
2010-08-24 14:38 ` burnus at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-12-04 23:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dfranke at gcc dot gnu dot org 2009-12-04 23:33 -------
Confirmed and marked as enhancement.
(I'd like to eventually be able to use the attribute DEPRECATED.)
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-12-04 23:33:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41209
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/41209] Add full ATTRIBUTE support to gfortran (ALIGN, (WEAK)ALIAS, ...)
2009-09-01 9:35 [Bug fortran/41209] New: Add full ATTRIBUTE support to gfortran (ALIGN, (WEAK)ALIAS, ...) burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-12-04 23:33 ` dfranke at gcc dot gnu dot org
@ 2010-02-18 16:19 ` burnus at gcc dot gnu dot org
2010-08-24 14:38 ` burnus at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-02-18 16:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from burnus at gcc dot gnu dot org 2010-02-18 16:19 -------
Another request for this feature:
http://gcc.gnu.org/ml/fortran/2010-02/msg00144.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41209
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/41209] Add full ATTRIBUTE support to gfortran (ALIGN, (WEAK)ALIAS, ...)
2009-09-01 9:35 [Bug fortran/41209] New: Add full ATTRIBUTE support to gfortran (ALIGN, (WEAK)ALIAS, ...) burnus at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-02-18 16:19 ` burnus at gcc dot gnu dot org
@ 2010-08-24 14:38 ` burnus at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-24 14:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from burnus at gcc dot gnu dot org 2010-08-24 14:38 -------
This feature is also useful for the test suite, e.g. to force no inlining.
TODO 3:
Some attributes need to be moved out of c-family/c-common.c to be available for
Fortran.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41209
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-08-24 14:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-01 9:35 [Bug fortran/41209] New: Add full ATTRIBUTE support to gfortran (ALIGN, (WEAK)ALIAS, ...) burnus at gcc dot gnu dot org
2009-09-01 13:30 ` [Bug fortran/41209] " burnus at gcc dot gnu dot org
2009-09-01 17:39 ` burnus at gcc dot gnu dot org
2009-12-04 23:33 ` dfranke at gcc dot gnu dot org
2010-02-18 16:19 ` burnus at gcc dot gnu dot org
2010-08-24 14:38 ` burnus 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).