public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41489]  New: PUBLIC - PRIVATE comflict
@ 2009-09-28 13:43 ros at rzg dot mpg dot de
  2009-09-28 14:01 ` [Bug fortran/41489] PUBLIC - PRIVATE conflict kargl at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ros at rzg dot mpg dot de @ 2009-09-28 13:43 UTC (permalink / raw)
  To: gcc-bugs

Gfortran fails to compile the module bug2.f90 with the following error message:

bug2.f90:18.4:

    Function REACT ()
   1
Error: PUBLIC function 'react' at (1) cannot be of PRIVATE type 'aoi'

The compile command simply was 'gfortran -c bug2.f90'.

gcc -v  gives:
Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.4/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada
--disable-checking --libdir=/usr/lib --enable-libgcj
--with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib
--enable-shared --enable-__cxa_atexit i586-suse-linux
Thread model: posix
gcc version 3.3.4 (pre 3.3.5 20040809)
(gcc version 4.3.1 leads to the same error message.)

uname -a  gives:
Linux roshome 2.6.8-24.10-default #1 Wed Dec 22 11:54:27 UTC 2004 i686 i686
i386 GNU/Linux

Here comes the test module 'bug2.f90':
  MODULE OPTOCAD
!
    private
    public oc_trace
!
    type :: aoi
      character         :: a=''        ! action
      integer           :: o=0         ! diffraction order
      integer           :: i=0         ! index of incidence angle
    end type aoi
!
  CONTAINS
!----------------------------------------------------------------------------!
    Subroutine OC_TRACE
!
    contains
   !-------------------------------------------------------------------------!
    Function REACT ()
!
    type(aoi)                :: react
!
    return
    end function REACT
   !-------------------------------------------------------------------------!
    end subroutine OC_TRACE
!----------------------------------------------------------------------------!
  END MODULE OPTOCAD


-- 
           Summary: PUBLIC - PRIVATE comflict
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ros at rzg dot mpg dot de


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


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

* [Bug fortran/41489] PUBLIC - PRIVATE conflict
  2009-09-28 13:43 [Bug fortran/41489] New: PUBLIC - PRIVATE comflict ros at rzg dot mpg dot de
@ 2009-09-28 14:01 ` kargl at gcc dot gnu dot org
  2009-09-28 14:58 ` ros at rzg dot mpg dot de
  2009-09-28 20:02 ` burnus at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-09-28 14:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from kargl at gcc dot gnu dot org  2009-09-28 14:01 -------
The code compiles with 

gcc version 4.4.2 20090924
gcc version 4.5.0 20090918

Please upgrade your compiler to a newer version because it is
unlikely that the patch will be backported to the 4.3 branch.


-- 

kargl at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


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


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

* [Bug fortran/41489] PUBLIC - PRIVATE conflict
  2009-09-28 13:43 [Bug fortran/41489] New: PUBLIC - PRIVATE comflict ros at rzg dot mpg dot de
  2009-09-28 14:01 ` [Bug fortran/41489] PUBLIC - PRIVATE conflict kargl at gcc dot gnu dot org
@ 2009-09-28 14:58 ` ros at rzg dot mpg dot de
  2009-09-28 20:02 ` burnus at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: ros at rzg dot mpg dot de @ 2009-09-28 14:58 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 904 bytes --]



------- Comment #2 from ros at rzg dot mpg dot de  2009-09-28 14:58 -------
Subject: Re:  PUBLIC - PRIVATE conflict

I'm sorry.  The error message disapeared when using gfortran 4.5 !
So my bug report is obsolete.


+----------------------------------------------------------------------+
|  Roland Schilling                      Home-Office: +49(89)32929-670 |
|  Max-Planck-Institut für Gravitationsphysik                          |
|  -- Albert-Einstein-Institut --                                      |
|  D-85748 Garching                           E-mail:   ros@rzg.mpg.de |
|  Germany                                  http://www.aei-hannover.de |
+----------------------------------------------------------------------+
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


-- 


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


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

* [Bug fortran/41489] PUBLIC - PRIVATE conflict
  2009-09-28 13:43 [Bug fortran/41489] New: PUBLIC - PRIVATE comflict ros at rzg dot mpg dot de
  2009-09-28 14:01 ` [Bug fortran/41489] PUBLIC - PRIVATE conflict kargl at gcc dot gnu dot org
  2009-09-28 14:58 ` ros at rzg dot mpg dot de
@ 2009-09-28 20:02 ` burnus at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-09-28 20:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from burnus at gcc dot gnu dot org  2009-09-28 20:02 -------
For completeness: I think it was fixed as part of PR 39800.

> The compile command simply was 'gfortran -c bug2.f90'.
> gcc -v  gives

You should have used "gfortran -v" instead. The "3.3.4" output won't help as
gfortran is only since 4.0.0 part of GCC; thus "gcc version 4.3.1 leads to the
same error message" presumably means that gfortran comes from 4.3.1 and the
same "gfortran" binary is called in either case.


> I'm sorry.  The error message disapeared when using gfortran 4.5 !
> So my bug report is obsolete.

No problem - better one bugreport too much than having no bugreport for a still
existing bug. Therefore: Thanks for reporting it.


-- 


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


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

end of thread, other threads:[~2009-09-28 20:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-28 13:43 [Bug fortran/41489] New: PUBLIC - PRIVATE comflict ros at rzg dot mpg dot de
2009-09-28 14:01 ` [Bug fortran/41489] PUBLIC - PRIVATE conflict kargl at gcc dot gnu dot org
2009-09-28 14:58 ` ros at rzg dot mpg dot de
2009-09-28 20:02 ` 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).