public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32736] New: Replace -fallow-leading-underscore by Bind(C)
@ 2007-07-12 8:04 burnus at gcc dot gnu dot org
2007-07-12 15:35 ` [Bug libfortran/32736] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-07-12 8:04 UTC (permalink / raw)
To: gcc-bugs
We use in the library the _gfortran_ prefix; to do so, the
-fallow-leading-underscore was created. The idea was to replace it as soon as
we have ISO C Bindings. Well, we do now ...
http://gcc.gnu.org/ml/gcc-cvs/2007-01/msg00712.html
r121007 | fxcoudert | 2007-01-20 19:33:20 +0100 (Sa, 20 Jan 2007) | 162 lines
* gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
* lang.opt: Add -fallow-leading-underscore.
* match.c (gfc_match_name): Allow leading underscore in symbol
name if -fallow-leading-underscore is used.
* symbol.c (gfc_get_default_type): Add special case for symbol
names beginning with an underscore.
* trans-decl.c (gfc_get_extern_function_decl,
gfc_build_intrinsic_function_decls): Add _gfortran prefix to
library symbols selected_int_kind, selected_real_kind and
all specifics.
* options.c (gfc_init_options, gfc_handle_option): Handle the
new -fallow-leading-underscore option.
* m4/misc_specifics.m4: Add _gfortran prefix to specific names.
* m4/specific2.m4: Likewise.
* m4/specific.m4: Likewise.
* intrinsics/f2c_specifics.F90: Likewise.
* intrinsics/selected_int_kind.f90: Add _gfortran prefix.
* intrinsics/selected_real_kind.f90: Likewise.
* intrinsics/dprod_r8.f90: Likewise.
* Makefile.am: Add -fallow-leading-underscore to the
gfor_specific_src files, as well as selected_real_kind.F90
and selected_int_kind.F90
* Makefile.in: Regenerate.
* generated/_sqrt_c8.F90: Regenerate.
[...]
--
Summary: Replace -fallow-leading-underscore by Bind(C)
Product: gcc
Version: 4.3.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=32736
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libfortran/32736] Replace -fallow-leading-underscore by Bind(C)
2007-07-12 8:04 [Bug fortran/32736] New: Replace -fallow-leading-underscore by Bind(C) burnus at gcc dot gnu dot org
@ 2007-07-12 15:35 ` pinskia at gcc dot gnu dot org
2007-07-28 12:51 ` fxcoudert at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-07-12 15:35 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Severity|normal |minor
Component|fortran |libfortran
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32736
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libfortran/32736] Replace -fallow-leading-underscore by Bind(C)
2007-07-12 8:04 [Bug fortran/32736] New: Replace -fallow-leading-underscore by Bind(C) burnus at gcc dot gnu dot org
2007-07-12 15:35 ` [Bug libfortran/32736] " pinskia at gcc dot gnu dot org
@ 2007-07-28 12:51 ` fxcoudert at gcc dot gnu dot org
2007-07-28 12:52 ` fxcoudert at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-07-28 12:51 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|minor |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-07-28 12:51:45
date| |
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32736
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libfortran/32736] Replace -fallow-leading-underscore by Bind(C)
2007-07-12 8:04 [Bug fortran/32736] New: Replace -fallow-leading-underscore by Bind(C) burnus at gcc dot gnu dot org
2007-07-12 15:35 ` [Bug libfortran/32736] " pinskia at gcc dot gnu dot org
2007-07-28 12:51 ` fxcoudert at gcc dot gnu dot org
@ 2007-07-28 12:52 ` fxcoudert at gcc dot gnu dot org
2007-07-28 18:17 ` fxcoudert at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-07-28 12:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2007-07-28 12:52 -------
I'll take care of that.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2007-07-28 12:51:45 |2007-07-28 12:52:05
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32736
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libfortran/32736] Replace -fallow-leading-underscore by Bind(C)
2007-07-12 8:04 [Bug fortran/32736] New: Replace -fallow-leading-underscore by Bind(C) burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-07-28 12:52 ` fxcoudert at gcc dot gnu dot org
@ 2007-07-28 18:17 ` fxcoudert at gcc dot gnu dot org
2007-07-28 20:12 ` fxcoudert at gcc dot gnu dot org
2007-08-05 10:39 ` fxcoudert at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-07-28 18:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2007-07-28 18:17 -------
Hum, first problem: we can't make a function like _gfortran_selected_real_kind
bind(c) because it has optional arguments:
function selected_real_kind (p, r) &
bind(c,name="_gfortran_selected_real_kind")
implicit none
integer, optional, intent (in) :: p, r
Error: Variable 'p' at (1) cannot have the OPTIONAL attribute because procedure
'selected_real_kind' is BIND(C)
Is there a way around this issue?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32736
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libfortran/32736] Replace -fallow-leading-underscore by Bind(C)
2007-07-12 8:04 [Bug fortran/32736] New: Replace -fallow-leading-underscore by Bind(C) burnus at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-07-28 18:17 ` fxcoudert at gcc dot gnu dot org
@ 2007-07-28 20:12 ` fxcoudert at gcc dot gnu dot org
2007-08-05 10:39 ` fxcoudert at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-07-28 20:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2007-07-28 20:12 -------
Another problem is that some of these routines take CHARACTER(LEN=*) arguments,
which make them incompatible with BIND(C):
../../../../trunk/libgfortran/generated/misc_specifics.F90:225.37:
elemental function index_1_i16 (parm1, parm2) result(res) &
1
Error: Character argument 'parm1' at (1) must be length 1 because procedure
'index_1_i16' is BIND(C)
I'm dropping this PR, as I don't think there actually is a solution. If noone
can think of something, I might close it in the near future...
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|fxcoudert at gcc dot gnu dot|unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32736
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libfortran/32736] Replace -fallow-leading-underscore by Bind(C)
2007-07-12 8:04 [Bug fortran/32736] New: Replace -fallow-leading-underscore by Bind(C) burnus at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-07-28 20:12 ` fxcoudert at gcc dot gnu dot org
@ 2007-08-05 10:39 ` fxcoudert at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-08-05 10:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from fxcoudert at gcc dot gnu dot org 2007-08-05 10:39 -------
The more I think about it, the surer I am that this isn't going to work.
Discussing it on IRC, nobody had ideas to circumvent the problem. Closing as
INVALID.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32736
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-08-05 10:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-12 8:04 [Bug fortran/32736] New: Replace -fallow-leading-underscore by Bind(C) burnus at gcc dot gnu dot org
2007-07-12 15:35 ` [Bug libfortran/32736] " pinskia at gcc dot gnu dot org
2007-07-28 12:51 ` fxcoudert at gcc dot gnu dot org
2007-07-28 12:52 ` fxcoudert at gcc dot gnu dot org
2007-07-28 18:17 ` fxcoudert at gcc dot gnu dot org
2007-07-28 20:12 ` fxcoudert at gcc dot gnu dot org
2007-08-05 10:39 ` fxcoudert 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).