public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/40568]  New: F2008: C_SIZEOF is in the wrong scope
@ 2009-06-27 16:06 burnus at gcc dot gnu dot org
  2009-07-05  9:19 ` [Bug fortran/40568] " fxcoudert 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-06-27 16:06 UTC (permalink / raw)
  To: gcc-bugs

C_SIZEOF should be a function in ISO_C_BINDING, however, in gfortran it is a
normal intrinsic.

Expected:
- The USE statement works
- Using C_SIZEOF should give an error

use iso_c_binding, only: so => c_sizeof
implicit none
print *, c_sizeof(1)
end


-- 
           Summary: F2008: C_SIZEOF is in the wrong scope
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          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=40568


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/40568] F2008: C_SIZEOF is in the wrong scope
  2009-06-27 16:06 [Bug fortran/40568] New: F2008: C_SIZEOF is in the wrong scope burnus at gcc dot gnu dot org
@ 2009-07-05  9:19 ` fxcoudert at gcc dot gnu dot org
  2009-12-13 16:20 ` [Bug fortran/40568] F2008: C_SIZEOF is in the wrong scope, rejected as initialization expression dfranke at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-07-05  9:19 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |accepts-invalid
   Last reconfirmed|0000-00-00 00:00:00         |2009-07-05 09:19:02
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40568


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/40568] F2008: C_SIZEOF is in the wrong scope, rejected as initialization expression
  2009-06-27 16:06 [Bug fortran/40568] New: F2008: C_SIZEOF is in the wrong scope burnus at gcc dot gnu dot org
  2009-07-05  9:19 ` [Bug fortran/40568] " fxcoudert at gcc dot gnu dot org
@ 2009-12-13 16:20 ` dfranke at gcc dot gnu dot org
  2010-05-02 15:21 ` dfranke at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-12-13 16:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dfranke at gcc dot gnu dot org  2009-12-13 16:19 -------
F2008 allows C_SIZEOF in initialization expressions:
The definition for "specification inquiry" is in Fortran 2008 (7.1.11
Specification expression):
"A speci\fcation inquiry is a reference to
(1) an intrinsic inquiry function,
[...]
(4) the function C_SIZEOF from the intrinsic module ISO C BINDING (15.2.3.7)"

Currently C_SIZEOF is rejected as init expression as it is not listed as valid
inquiry function, neither is CLASS_INQUIRY in intrinsic.c(add_functions) set.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org
OtherBugsDependingO|                            |29962, 39627
              nThis|                            |
            Summary|F2008: C_SIZEOF is in the   |F2008: C_SIZEOF is in the
                   |wrong scope                 |wrong scope, rejected as
                   |                            |initialization expression


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40568


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/40568] F2008: C_SIZEOF is in the wrong scope, rejected as initialization expression
  2009-06-27 16:06 [Bug fortran/40568] New: F2008: C_SIZEOF is in the wrong scope burnus at gcc dot gnu dot org
  2009-07-05  9:19 ` [Bug fortran/40568] " fxcoudert at gcc dot gnu dot org
  2009-12-13 16:20 ` [Bug fortran/40568] F2008: C_SIZEOF is in the wrong scope, rejected as initialization expression dfranke at gcc dot gnu dot org
@ 2010-05-02 15:21 ` dfranke at gcc dot gnu dot org
  2010-05-09 18:11 ` dfranke at gcc dot gnu dot org
  2010-06-23 16:45 ` burnus at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-02 15:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dfranke at gcc dot gnu dot org  2010-05-02 15:21 -------
See also PR36437.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |32630
              nThis|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40568


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/40568] F2008: C_SIZEOF is in the wrong scope, rejected as initialization expression
  2009-06-27 16:06 [Bug fortran/40568] New: F2008: C_SIZEOF is in the wrong scope burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2010-05-02 15:21 ` dfranke at gcc dot gnu dot org
@ 2010-05-09 18:11 ` dfranke at gcc dot gnu dot org
  2010-06-23 16:45 ` burnus at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-09 18:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dfranke at gcc dot gnu dot org  2010-05-09 18:11 -------
Created an attachment (id=20612)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20612&action=view)
first steps to bring C_SIZEOF to the ISO_C_BINDING

Attached patch is a start only. Comments:
 * symbol.c (build_formal_args): wrong parameter generated, probably needs a
new gen_*_param function
 * on -std=f2003 there's only a linker error (undefined reference), no
F2008-only warning
 * simplification/translation needs to be hijacked from sizeof


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40568


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/40568] F2008: C_SIZEOF is in the wrong scope, rejected as initialization expression
  2009-06-27 16:06 [Bug fortran/40568] New: F2008: C_SIZEOF is in the wrong scope burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2010-05-09 18:11 ` dfranke at gcc dot gnu dot org
@ 2010-06-23 16:45 ` burnus at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-06-23 16:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2010-06-23 16:45 -------
Cf. PR 40569 for two other module procedures of ISO_C_BINDING


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40568


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-06-23 16:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-27 16:06 [Bug fortran/40568] New: F2008: C_SIZEOF is in the wrong scope burnus at gcc dot gnu dot org
2009-07-05  9:19 ` [Bug fortran/40568] " fxcoudert at gcc dot gnu dot org
2009-12-13 16:20 ` [Bug fortran/40568] F2008: C_SIZEOF is in the wrong scope, rejected as initialization expression dfranke at gcc dot gnu dot org
2010-05-02 15:21 ` dfranke at gcc dot gnu dot org
2010-05-09 18:11 ` dfranke at gcc dot gnu dot org
2010-06-23 16:45 ` 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).