public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/40955]  New: STDCALL attributes are not saved in the .MOD files
@ 2009-08-03 21:15 burnus at gcc dot gnu dot org
  2009-08-03 22:34 ` [Bug fortran/40955] " burnus 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 @ 2009-08-03 21:15 UTC (permalink / raw)
  To: gcc-bugs

See also:
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/eb7ca487876d9420


-- 
           Summary: STDCALL attributes are not saved in the .MOD files
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          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=40955


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

* [Bug fortran/40955] STDCALL attributes are not saved in the .MOD files
  2009-08-03 21:15 [Bug fortran/40955] New: STDCALL attributes are not saved in the .MOD files burnus at gcc dot gnu dot org
@ 2009-08-03 22:34 ` burnus at gcc dot gnu dot org
  2009-08-04  9:34 ` burnus at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-03 22:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2009-08-03 22:34 -------
Mine! -- Patch:

Index: gcc/fortran/module.c
===================================================================
--- gcc/fortran/module.c        (Revision 150376)
+++ gcc/fortran/module.c        (Arbeitskopie)
@@ -1655,3 +1655,3 @@ typedef enum
   AB_IS_BIND_C, AB_IS_C_INTEROP, AB_IS_ISO_C, AB_ABSTRACT, AB_ZERO_COMP,
-  AB_EXTENSION, AB_PROCEDURE, AB_PROC_POINTER
+  AB_EXTENSION, AB_PROCEDURE, AB_PROC_POINTER, AB_EXT_ATTR
 }
@@ -1698,2 +1698,3 @@ static const mstring attr_bits[] =
     minit ("PROC_POINTER", AB_PROC_POINTER),
+    minit ("EXT_ATTR", AB_EXT_ATTR),
     minit (NULL, -1)
@@ -1843,2 +1844,4 @@ mio_symbol_attribute (symbol_attribute *
        MIO_NAME (ab_attribute) (AB_PROC_POINTER, attr_bits);
+      if (attr->ext_attr)
+       MIO_NAME (ab_ext_attr) (AB_EXT_ATTR, attr_bits);

@@ -1969,2 +1972,4 @@ mio_symbol_attribute (symbol_attribute *
              attr->proc_pointer = 1;
+           case AB_EXT_ATTR:
+             attr->ext_attr = 1;
              break;


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |burnus at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-08-03 22:34:06
               date|                            |


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


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

* [Bug fortran/40955] STDCALL attributes are not saved in the .MOD files
  2009-08-03 21:15 [Bug fortran/40955] New: STDCALL attributes are not saved in the .MOD files burnus at gcc dot gnu dot org
  2009-08-03 22:34 ` [Bug fortran/40955] " burnus at gcc dot gnu dot org
@ 2009-08-04  9:34 ` burnus at gcc dot gnu dot org
  2009-08-05  8:01 ` burnus at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-04  9:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2009-08-04 09:34 -------
The following patch is also missing. Probably appears when using abstract
interfaces. One needs to check the proc pointer machinery as well as there one
might also miss such an option - there, one might also need to add options.
e.g. the interface name points to a STDCALL function while one adds a DLLEXPORT
(or something like that - I cannot come up with an example which makes sense).

Index: gcc/fortran/symbol.c
===================================================================
--- gcc/fortran/symbol.c        (revision 150396)
+++ gcc/fortran/symbol.c        (working copy)
@@ -1641,6 +1641,8 @@ gfc_copy_attr (symbol_attribute *dest, s
 {
   int is_proc_lang_bind_spec;

+  dest->ext_attr = src->ext_attr;
+
   if (src->allocatable && gfc_add_allocatable (dest, where) == FAILURE)
     goto fail;


-- 


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


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

* [Bug fortran/40955] STDCALL attributes are not saved in the .MOD files
  2009-08-03 21:15 [Bug fortran/40955] New: STDCALL attributes are not saved in the .MOD files burnus at gcc dot gnu dot org
  2009-08-03 22:34 ` [Bug fortran/40955] " burnus at gcc dot gnu dot org
  2009-08-04  9:34 ` burnus at gcc dot gnu dot org
@ 2009-08-05  8:01 ` burnus at gcc dot gnu dot org
  2009-08-09  8:36 ` burnus at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-05  8:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from burnus at gcc dot gnu dot org  2009-08-05 08:00 -------
Regarding gfc_copy_attr: The following program should print on x86-64(-linux)
the warnings:
  warning: 'dllexport' attribute directive ignored
  warning: 'stdcall' attribute directive ignored


abstract interface
  subroutine tpl()
!GCC$ ATTRIBUTES STDCALL :: tpl
  end subroutine tpl
end interface

procedure(tpl) :: foo
!GCC$ ATTRIBUTES DLLEXPORT :: foo
call foo()
end


-- 


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


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

* [Bug fortran/40955] STDCALL attributes are not saved in the .MOD files
  2009-08-03 21:15 [Bug fortran/40955] New: STDCALL attributes are not saved in the .MOD files burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-08-05  8:01 ` burnus at gcc dot gnu dot org
@ 2009-08-09  8:36 ` burnus at gcc dot gnu dot org
  2009-08-09  8:40 ` burnus at gcc dot gnu dot org
  2009-08-14  2:36 ` jvdelisle at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-09  8:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2009-08-09 08:36 -------
Subject: Bug 40955

Author: burnus
Date: Sun Aug  9 08:35:36 2009
New Revision: 150589

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150589
Log:
2009-08-05  Tobias Burnus  <burnus@net-b.de>

        PR fortran/40955
        * gfortran.h (ext_attr_id_t): Add typedef for this enum.
        (gfc_add_ext_attribute): Use it.
        * decl.c (gfc_match_gcc_attributes): Ditto.
        * expr.c (gfc_check_pointer_assign): Ditto.
        * symbol.c (gfc_add_ext_attribute): Ditto.
        (gfc_copy_attr): Copy also ext_attr.
        * resolve.c (resolve_fl_derived,resolve_symbol): Ditto.
        * module.c (mio_symbol_attribute): Save ext_attr in the mod
        * file.

2009-08-05  Tobias Burnus  <burnus@net-b.de>

        PR fortran/40955
        * gfortran.dg/module_md5_1.f90: Update MD5 check sum.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/module.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/module_md5_1.f90


-- 


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


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

* [Bug fortran/40955] STDCALL attributes are not saved in the .MOD files
  2009-08-03 21:15 [Bug fortran/40955] New: STDCALL attributes are not saved in the .MOD files burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-08-09  8:36 ` burnus at gcc dot gnu dot org
@ 2009-08-09  8:40 ` burnus at gcc dot gnu dot org
  2009-08-14  2:36 ` jvdelisle at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-09  8:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from burnus at gcc dot gnu dot org  2009-08-09 08:40 -------
FIXED on the trunk (4.5).


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug fortran/40955] STDCALL attributes are not saved in the .MOD files
  2009-08-03 21:15 [Bug fortran/40955] New: STDCALL attributes are not saved in the .MOD files burnus at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-08-09  8:40 ` burnus at gcc dot gnu dot org
@ 2009-08-14  2:36 ` jvdelisle at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-08-14  2:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jvdelisle at gcc dot gnu dot org  2009-08-14 02:35 -------
Subject: Bug 40955

Author: jvdelisle
Date: Fri Aug 14 02:35:32 2009
New Revision: 150733

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150733
Log:
2009-08-13  Jerry DeLisle <jvdelisle@gcc.gnu.org>

        PR fortran/40955
        * gfortran.dg/winapi.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/winapi.f90
Modified:
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2009-08-14  2:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-03 21:15 [Bug fortran/40955] New: STDCALL attributes are not saved in the .MOD files burnus at gcc dot gnu dot org
2009-08-03 22:34 ` [Bug fortran/40955] " burnus at gcc dot gnu dot org
2009-08-04  9:34 ` burnus at gcc dot gnu dot org
2009-08-05  8:01 ` burnus at gcc dot gnu dot org
2009-08-09  8:36 ` burnus at gcc dot gnu dot org
2009-08-09  8:40 ` burnus at gcc dot gnu dot org
2009-08-14  2:36 ` jvdelisle 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).