public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/16943] New: doubly defined function type causes error, even when types are the same
@ 2004-08-09 14:40 paulthomas2 at wanadoo dot fr
  2004-08-09 16:06 ` [Bug fortran/16943] " pinskia at gcc dot gnu dot org
  2005-02-08 19:07 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 6+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2004-08-09 14:40 UTC (permalink / raw)
  To: gcc-bugs

!  $ ../bin/gfortran bug8.f90 -o test
! In file bug8.f90:18
!
!        integer :: N
!                   1
!  Error: Symbol 'n' at (1) already has basic type of INTEGER

! other compilers warn rather than give error, if the types are consistent

  program bug8 
    implicit none 
    stop " OK. " 

  contains 

    integer function bugf(M) result (N) 
      integer, intent (in) :: M 
      integer :: N
      N = M 
      return 
    end function bugf
  end program bug8

-- 
           Summary: doubly defined function type causes error, even when
                    types are the same
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paulthomas2 at wanadoo dot fr
                CC: bdavis at gcc dot gnu dot org,gcc-bugs at gcc dot gnu
                    dot org


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


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

* [Bug fortran/16943] doubly defined function type causes error, even when types are the same
  2004-08-09 14:40 [Bug fortran/16943] New: doubly defined function type causes error, even when types are the same paulthomas2 at wanadoo dot fr
@ 2004-08-09 16:06 ` pinskia at gcc dot gnu dot org
  2005-02-08 19:07 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-09 16:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-09 16:06 -------
Note ICC says this is extension:
   program BUG8
     internal function BUGF

      integer :: N
                 ^
Warning 106 at (9:pr16943.f90) : A duplicate specification of the type for this entity is an extension to 
standard Fortran 95

Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|minor                       |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-09 16:06:55
               date|                            |


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


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

* [Bug fortran/16943] doubly defined function type causes error, even when types are the same
  2004-08-09 14:40 [Bug fortran/16943] New: doubly defined function type causes error, even when types are the same paulthomas2 at wanadoo dot fr
  2004-08-09 16:06 ` [Bug fortran/16943] " pinskia at gcc dot gnu dot org
@ 2005-02-08 19:07 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-08 19:07 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
   Last reconfirmed|2004-11-08 03:03:11         |2005-02-08 13:54:04
               date|                            |


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


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

* [Bug fortran/16943] doubly defined function type causes error, even when types are the same
       [not found] <bug-16943-8128@http.gcc.gnu.org/bugzilla/>
  2006-06-05  7:45 ` pault at gcc dot gnu dot org
  2006-06-05 10:15 ` pault at gcc dot gnu dot org
@ 2006-06-05 10:24 ` pault at gcc dot gnu dot org
  2 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-06-05 10:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pault at gcc dot gnu dot org  2006-06-05 10:22 -------
Fixed on trunk and 4.1

Paul


-- 

pault at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/16943] doubly defined function type causes error, even when types are the same
       [not found] <bug-16943-8128@http.gcc.gnu.org/bugzilla/>
  2006-06-05  7:45 ` pault at gcc dot gnu dot org
@ 2006-06-05 10:15 ` pault at gcc dot gnu dot org
  2006-06-05 10:24 ` pault at gcc dot gnu dot org
  2 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-06-05 10:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pault at gcc dot gnu dot org  2006-06-05 10:14 -------
Subject: Bug 16943

Author: pault
Date: Mon Jun  5 10:14:32 2006
New Revision: 114387

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114387
Log:
2006-06-05  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/14067
        * data.c (create_character_intializer): Add warning message
        for truncated string.

        PR fortran/16943
        * symbol.c : Include flags.h.
        (gfc_add_type): If a procedure and types are the same do not
        throw an error unless standard is less than gnu or pedantic.

        PR fortran/20838
        * parse.c (parse_do_block): Error if named block do construct
        does not have a named enddo.

        PR fortran/27655
        * check.c (gfc_check_associated): Pick up EXPR_NULL for pointer
        as well as target and put error return at end of function.

2006-06-05  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/14067
        * gfortran.dg/data_char_1.f90: Add messages for truncated
        strings.

        PR fortran/16943
        * gfortran.dg/func_decl_2.f90: New test.

        PR fortran/20838
        * gfortran.dg/do_2.f90: New test.

        PR fortran/27655
        * gfortran.dg/associated_3.f90: New test.


Added:
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/associated_3.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/do_2.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/func_decl_2.f90
Modified:
    branches/gcc-4_1-branch/gcc/fortran/ChangeLog
    branches/gcc-4_1-branch/gcc/fortran/check.c
    branches/gcc-4_1-branch/gcc/fortran/data.c
    branches/gcc-4_1-branch/gcc/fortran/parse.c
    branches/gcc-4_1-branch/gcc/fortran/symbol.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/data_char_1.f90


-- 


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


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

* [Bug fortran/16943] doubly defined function type causes error, even when types are the same
       [not found] <bug-16943-8128@http.gcc.gnu.org/bugzilla/>
@ 2006-06-05  7:45 ` pault at gcc dot gnu dot org
  2006-06-05 10:15 ` pault at gcc dot gnu dot org
  2006-06-05 10:24 ` pault at gcc dot gnu dot org
  2 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-06-05  7:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pault at gcc dot gnu dot org  2006-06-05 07:45 -------
Subject: Bug 16943

Author: pault
Date: Mon Jun  5 07:45:03 2006
New Revision: 114385

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114385
Log:
2006-06-05  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/14067
        * data.c (create_character_intializer): Add warning message
        for truncated string.

        PR fortran/16943
        * symbol.c : Include flags.h.
        (gfc_add_type): If a procedure and types are the same do not
        throw an error unless standard is less than gnu or pedantic.

        PR fortran/20838
        * parse.c (parse_do_block): Error if named block do construct
        does not have a named enddo.

        PR fortran/27655
        * check.c (gfc_check_associated): Pick up EXPR_NULL for pointer
        as well as target and put error return at end of function.

2006-06-05  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/14067
        * gfortran.dg/data_char_1.f90: Add messages for truncated
        strings.

        PR fortran/16943
        * gfortran.dg/func_decl_2.f90: New test.

        PR fortran/20838
        * gfortran.dg/do_2.f90: New test.

        PR fortran/27655
        * gfortran.dg/associated_3.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/associated_3.f90
    trunk/gcc/testsuite/gfortran.dg/do_2.f90
    trunk/gcc/testsuite/gfortran.dg/func_decl_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/data.c
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/data_char_1.f90


-- 


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


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

end of thread, other threads:[~2006-06-05 10:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-09 14:40 [Bug fortran/16943] New: doubly defined function type causes error, even when types are the same paulthomas2 at wanadoo dot fr
2004-08-09 16:06 ` [Bug fortran/16943] " pinskia at gcc dot gnu dot org
2005-02-08 19:07 ` pinskia at gcc dot gnu dot org
     [not found] <bug-16943-8128@http.gcc.gnu.org/bugzilla/>
2006-06-05  7:45 ` pault at gcc dot gnu dot org
2006-06-05 10:15 ` pault at gcc dot gnu dot org
2006-06-05 10:24 ` pault 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).