public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/34527]  New: Declaring a variable twice with different characteristics
@ 2007-12-19  0:02 burnus at gcc dot gnu dot org
  2008-03-13 14:30 ` [Bug fortran/34527] " fxcoudert at gcc dot gnu dot org
  2009-12-08 20:58 ` dfranke at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-12-19  0:02 UTC (permalink / raw)
  To: gcc-bugs

The following is invalid and rejected using -std=f2003, but I wonder whether
one should not also reject it otherwise? What is the string length?

function a(n,m)
   integer :: n,m
   character(n) a
   character(m) a
end

ifort and g95 reject it always.

 * * *

If one wants to add only a check whether the variables are the same, one could
use the same check for:

function a(n,m)
   integer :: n,m
   character(n) a
   character(m) b
entry b(n,m)
end

NAG f95 and ifort reject this with:
- Incompatible character length for ENTRY B of function A
- The characteristics of the function named on the ENTRY statement are
different from the characteristics of the result of the function named on the
FUNCTION statement.

gfortran currently (PR34421) accepts this for non-constant expressions.


-- 
           Summary: Declaring a variable twice with different
                    characteristics
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          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=34527


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

* [Bug fortran/34527] Declaring a variable twice with different characteristics
  2007-12-19  0:02 [Bug fortran/34527] New: Declaring a variable twice with different characteristics burnus at gcc dot gnu dot org
@ 2008-03-13 14:30 ` fxcoudert at gcc dot gnu dot org
  2009-12-08 20:58 ` dfranke at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-03-13 14:30 UTC (permalink / raw)
  To: gcc-bugs



-- 

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-03-13 14:30:01
               date|                            |


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


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

* [Bug fortran/34527] Declaring a variable twice with different characteristics
  2007-12-19  0:02 [Bug fortran/34527] New: Declaring a variable twice with different characteristics burnus at gcc dot gnu dot org
  2008-03-13 14:30 ` [Bug fortran/34527] " fxcoudert at gcc dot gnu dot org
@ 2009-12-08 20:58 ` dfranke at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-12-08 20:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dfranke at gcc dot gnu dot org  2009-12-08 20:58 -------
Marking as dupe, discussion happened in PR37412.

*** This bug has been marked as a duplicate of 37412 ***


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2009-12-08 20:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-19  0:02 [Bug fortran/34527] New: Declaring a variable twice with different characteristics burnus at gcc dot gnu dot org
2008-03-13 14:30 ` [Bug fortran/34527] " fxcoudert at gcc dot gnu dot org
2009-12-08 20:58 ` 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).