public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/36275] New: Binding label can be any scalar char initialisation expression
@ 2008-05-20 9:59 fxcoudert at gcc dot gnu dot org
2008-05-20 10:10 ` [Bug fortran/36275] " fxcoudert at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-05-20 9:59 UTC (permalink / raw)
To: gcc-bugs
The following is legal:
function x(z) bind(C,name='x'//'f')
integer :: z, x
end function x
as the Standard (F2003) only says:
R509: language-binding-spec is BIND (C [, NAME =
scalar-char-initialization-expr ])
C540: The scalar-char-initialization-expr shall be of default character kind.
So, any scalar char initialisation expression of default character kind is fair
game. This will require removing a good part of the code in gfc_match_bind_c(),
and call more generic routines instead, so it's not really bad news (and it
also requires remove the gfc_match_name_C function).
--
Summary: Binding label can be any scalar char initialisation
expression
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36275
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/36275] Binding label can be any scalar char initialisation expression
2008-05-20 9:59 [Bug fortran/36275] New: Binding label can be any scalar char initialisation expression fxcoudert at gcc dot gnu dot org
@ 2008-05-20 10:10 ` fxcoudert at gcc dot gnu dot org
2008-05-20 16:52 ` burnus at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-05-20 10:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2008-05-20 10:09 -------
And there is more to it (with import statements), see the rest of the thread at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/148d078cda002dc1#
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-05-20 10:09:55
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36275
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/36275] Binding label can be any scalar char initialisation expression
2008-05-20 9:59 [Bug fortran/36275] New: Binding label can be any scalar char initialisation expression fxcoudert at gcc dot gnu dot org
2008-05-20 10:10 ` [Bug fortran/36275] " fxcoudert at gcc dot gnu dot org
@ 2008-05-20 16:52 ` burnus at gcc dot gnu dot org
2008-05-28 21:59 ` janus at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-05-20 16:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2008-05-20 16:51 -------
The other problem mentioned in the thread is the following bogus warning:
procedure(stub), bind(C,name='cacosf') :: my_ACOS ! Compiles
1
Warning: Variable 'my_acos' at (1) may not be a C interoperable kind but it is
bind(c)
I think it appeared after 2008-05-01-Rev134843 and should be related to one of
the procedure patches. Test case:
module trig_sp
use ISO_C_BINDING
integer, parameter :: rkind = C_FLOAT
integer, parameter :: ckind = C_FLOAT_COMPLEX
abstract interface
function stub(z) bind(C)
import rkind, ckind
complex(ckind), value :: z
complex(ckind) stub
end function stub
end interface
procedure(stub), bind(C,name='cacosf') :: my_ACOS ! Compiles
end module trig_sp
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36275
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/36275] Binding label can be any scalar char initialisation expression
2008-05-20 9:59 [Bug fortran/36275] New: Binding label can be any scalar char initialisation expression fxcoudert at gcc dot gnu dot org
2008-05-20 10:10 ` [Bug fortran/36275] " fxcoudert at gcc dot gnu dot org
2008-05-20 16:52 ` burnus at gcc dot gnu dot org
@ 2008-05-28 21:59 ` janus at gcc dot gnu dot org
2008-06-04 21:06 ` janus at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: janus at gcc dot gnu dot org @ 2008-05-28 21:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from janus at gcc dot gnu dot org 2008-05-28 21:58 -------
The problem in comment #2 was indeed introduced by my rev. 134867, and can be
fixed by the following patch:
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 136130)
+++ gcc/fortran/resolve.c (working copy)
@@ -7751,6 +7751,7 @@ resolve_symbol (gfc_symbol *sym)
{
sym->ts.type = sym->ts.interface->ts.type;
sym->ts.kind = sym->ts.interface->ts.kind;
+ sym->ts.is_c_interop = sym->ts.interface->ts.is_c_interop;
sym->attr.function = sym->ts.interface->attr.function;
sym->attr.subroutine = sym->ts.interface->attr.subroutine;
copy_formal_args (sym, sym->ts.interface);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36275
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/36275] Binding label can be any scalar char initialisation expression
2008-05-20 9:59 [Bug fortran/36275] New: Binding label can be any scalar char initialisation expression fxcoudert at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-05-28 21:59 ` janus at gcc dot gnu dot org
@ 2008-06-04 21:06 ` janus at gcc dot gnu dot org
2008-06-04 21:11 ` janus at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: janus at gcc dot gnu dot org @ 2008-06-04 21:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from janus at gcc dot gnu dot org 2008-06-04 21:05 -------
Subject: Bug 36275
Author: janus
Date: Wed Jun 4 21:04:32 2008
New Revision: 136372
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136372
Log:
2008-06-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/36322
PR fortran/36275
* resolve.c (resolve_symbol): Correctly copy the interface for a
PROCEDURE declaration.
2008-06-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/36322
PR fortran/36275
* gfortran.dg/proc_decl_2.f90: Extended.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/proc_decl_2.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36275
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/36275] Binding label can be any scalar char initialisation expression
2008-05-20 9:59 [Bug fortran/36275] New: Binding label can be any scalar char initialisation expression fxcoudert at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-06-04 21:06 ` janus at gcc dot gnu dot org
@ 2008-06-04 21:11 ` janus at gcc dot gnu dot org
2008-09-03 21:45 ` mikael dot morin at tele2 dot fr
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: janus at gcc dot gnu dot org @ 2008-06-04 21:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from janus at gcc dot gnu dot org 2008-06-04 21:10 -------
Rev. 136372 fixes the issue from comment #2 (but not the original test case in
comment #0).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36275
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/36275] Binding label can be any scalar char initialisation expression
2008-05-20 9:59 [Bug fortran/36275] New: Binding label can be any scalar char initialisation expression fxcoudert at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-06-04 21:11 ` janus at gcc dot gnu dot org
@ 2008-09-03 21:45 ` mikael dot morin at tele2 dot fr
2009-05-24 20:08 ` fxcoudert at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mikael dot morin at tele2 dot fr @ 2008-09-03 21:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from mikael dot morin at tele2 dot fr 2008-09-03 21:44 -------
Created an attachment (id=16215)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16215&action=view)
proposed patch
With this patch the first testcase compiles with two warnings.
It doesn't handle import statements as it is far less trivial ;)
I'll have to see more in details what was said on the c.l.f thread.
Awaiting constructive (or destructive if you prefer) comments, advices,
screams, ...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36275
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/36275] Binding label can be any scalar char initialisation expression
2008-05-20 9:59 [Bug fortran/36275] New: Binding label can be any scalar char initialisation expression fxcoudert at gcc dot gnu dot org
` (6 preceding siblings ...)
2009-05-24 20:08 ` fxcoudert at gcc dot gnu dot org
@ 2009-05-24 20:08 ` fxcoudert at gcc dot gnu dot org
2009-12-10 19:11 ` dfranke at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-05-24 20:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from fxcoudert at gcc dot gnu dot org 2009-05-24 20:07 -------
*** Bug 38838 has been marked as a duplicate of this bug. ***
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36275
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/36275] Binding label can be any scalar char initialisation expression
2008-05-20 9:59 [Bug fortran/36275] New: Binding label can be any scalar char initialisation expression fxcoudert at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-09-03 21:45 ` mikael dot morin at tele2 dot fr
@ 2009-05-24 20:08 ` fxcoudert at gcc dot gnu dot org
2009-05-24 20:08 ` fxcoudert at gcc dot gnu dot org
2009-12-10 19:11 ` dfranke at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-05-24 20:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from fxcoudert at gcc dot gnu dot org 2009-05-24 20:08 -------
PR38838 has additional testcases:
subroutine test() bind(c, name=trim("Hello "))
end
and
subroutine test() bind(c, name=1_"name")
end
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2008-05-20 10:09:55 |2009-05-24 20:08:36
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36275
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/36275] Binding label can be any scalar char initialisation expression
2008-05-20 9:59 [Bug fortran/36275] New: Binding label can be any scalar char initialisation expression fxcoudert at gcc dot gnu dot org
` (7 preceding siblings ...)
2009-05-24 20:08 ` fxcoudert at gcc dot gnu dot org
@ 2009-12-10 19:11 ` dfranke at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-12-10 19:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from dfranke at gcc dot gnu dot org 2009-12-10 19:10 -------
See also PR38839 for expanded character set.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36275
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-12-10 19:11 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-20 9:59 [Bug fortran/36275] New: Binding label can be any scalar char initialisation expression fxcoudert at gcc dot gnu dot org
2008-05-20 10:10 ` [Bug fortran/36275] " fxcoudert at gcc dot gnu dot org
2008-05-20 16:52 ` burnus at gcc dot gnu dot org
2008-05-28 21:59 ` janus at gcc dot gnu dot org
2008-06-04 21:06 ` janus at gcc dot gnu dot org
2008-06-04 21:11 ` janus at gcc dot gnu dot org
2008-09-03 21:45 ` mikael dot morin at tele2 dot fr
2009-05-24 20:08 ` fxcoudert at gcc dot gnu dot org
2009-05-24 20:08 ` fxcoudert at gcc dot gnu dot org
2009-12-10 19:11 ` dfranke 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).