public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/13826] New: Derived types in DATA statements not PARAMETERs
@ 2004-01-23  6:22 giese025 at tc dot umn dot edu
  2004-01-23  6:24 ` [Bug fortran/13826] " giese025 at tc dot umn dot edu
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: giese025 at tc dot umn dot edu @ 2004-01-23  6:22 UTC (permalink / raw)
  To: gcc-bugs

I installed G95 Download x86 Linux Binary (01/21/04) and observed what I think
may be an error in G95.

Attached to this messege is the source code to a fairly small program which
simply prints out common scientific and mathematical constants (foo.f90).

Also attached is the output of the program when compiled with the NAG FORTRAN
90/95 (v4.2) compiler (foo.f90.nag.out).  NAG compiles the program without
warning nor error.


G95 fails to compile and produces the following error:

 In file foo.f90:138
 
     & ConstantT('ELECTRON_VOLT',  'au / eV',          &
               1
Error: Symbol 'constantt' must be a PARAMETER in DATA statement at (1)



Apparently it doesn't like derived types within a DATA statement?  That's how I
interpret it.

I'm not finding a button at the moment to attach a file... I'll submit this now
and perhaps one will appear... if not, I'll include the raw files as additional
comments.

-- 
           Summary: Derived types in DATA statements not PARAMETERs
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: giese025 at tc dot umn dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug fortran/13826] Derived types in DATA statements not PARAMETERs
  2004-01-23  6:22 [Bug fortran/13826] New: Derived types in DATA statements not PARAMETERs giese025 at tc dot umn dot edu
@ 2004-01-23  6:24 ` giese025 at tc dot umn dot edu
  2004-01-23  6:25 ` [Bug fortran/13826] [gfortran] " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: giese025 at tc dot umn dot edu @ 2004-01-23  6:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giese025 at tc dot umn dot edu  2004-01-23 06:24 -------
Created an attachment (id=5557)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5557&action=view)
Test program to reproduce error

foo.f90 is a program which simply prints out fundamental mathematical and
phyiscal constants.  It can be used to reproduce the error.

-- 


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


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

* [Bug fortran/13826] [gfortran] Derived types in DATA statements not PARAMETERs
  2004-01-23  6:22 [Bug fortran/13826] New: Derived types in DATA statements not PARAMETERs giese025 at tc dot umn dot edu
  2004-01-23  6:24 ` [Bug fortran/13826] " giese025 at tc dot umn dot edu
@ 2004-01-23  6:25 ` pinskia at gcc dot gnu dot org
  2004-01-23  6:26 ` giese025 at tc dot umn dot edu
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-23  6:25 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
            Summary|Derived types in DATA       |[gfortran] Derived types in
                   |statements not PARAMETERs   |DATA statements not
                   |                            |PARAMETERs
   Target Milestone|---                         |tree-ssa
            Version|unknown                     |tree-ssa


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


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

* [Bug fortran/13826] [gfortran] Derived types in DATA statements not PARAMETERs
  2004-01-23  6:22 [Bug fortran/13826] New: Derived types in DATA statements not PARAMETERs giese025 at tc dot umn dot edu
  2004-01-23  6:24 ` [Bug fortran/13826] " giese025 at tc dot umn dot edu
  2004-01-23  6:25 ` [Bug fortran/13826] [gfortran] " pinskia at gcc dot gnu dot org
@ 2004-01-23  6:26 ` giese025 at tc dot umn dot edu
  2004-01-25 17:44 ` dhazeghi at yahoo dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: giese025 at tc dot umn dot edu @ 2004-01-23  6:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giese025 at tc dot umn dot edu  2004-01-23 06:26 -------
Created an attachment (id=5558)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5558&action=view)
The CORRECT output of foo.f90

foo.f90.nag.out is the output from the foo.f90 executable as compiled with the
NAG compiler.

-- 


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


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

* [Bug fortran/13826] [gfortran] Derived types in DATA statements not PARAMETERs
  2004-01-23  6:22 [Bug fortran/13826] New: Derived types in DATA statements not PARAMETERs giese025 at tc dot umn dot edu
                   ` (2 preceding siblings ...)
  2004-01-23  6:26 ` giese025 at tc dot umn dot edu
@ 2004-01-25 17:44 ` dhazeghi at yahoo dot com
  2004-04-26  5:20 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dhazeghi at yahoo dot com @ 2004-01-25 17:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dhazeghi at yahoo dot com  2004-01-25 17:44 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-25 17:44:35
               date|                            |
   Target Milestone|tree-ssa                    |---


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


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

* [Bug fortran/13826] [gfortran] Derived types in DATA statements not PARAMETERs
  2004-01-23  6:22 [Bug fortran/13826] New: Derived types in DATA statements not PARAMETERs giese025 at tc dot umn dot edu
                   ` (3 preceding siblings ...)
  2004-01-25 17:44 ` dhazeghi at yahoo dot com
@ 2004-04-26  5:20 ` pinskia at gcc dot gnu dot org
  2004-05-12 15:52 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-26  5:20 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |tree-ssa


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


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

* [Bug fortran/13826] [gfortran] Derived types in DATA statements not PARAMETERs
  2004-01-23  6:22 [Bug fortran/13826] New: Derived types in DATA statements not PARAMETERs giese025 at tc dot umn dot edu
                   ` (4 preceding siblings ...)
  2004-04-26  5:20 ` pinskia at gcc dot gnu dot org
@ 2004-05-12 15:52 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
  2004-05-16 20:30 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Tobias dot Schlueter at physik dot uni-muenchen dot de @ 2004-05-12 15:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de  2004-05-11 19:07 -------
Patch here: http://gcc.gnu.org/ml/fortran/2004-05/msg00111.html (Sorry, Andrew,
I can't add the patch keyword myself)

-- 


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


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

* [Bug fortran/13826] [gfortran] Derived types in DATA statements not PARAMETERs
  2004-01-23  6:22 [Bug fortran/13826] New: Derived types in DATA statements not PARAMETERs giese025 at tc dot umn dot edu
                   ` (5 preceding siblings ...)
  2004-05-12 15:52 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
@ 2004-05-16 20:30 ` cvs-commit at gcc dot gnu dot org
  2004-05-16 20:43 ` cvs-commit at gcc dot gnu dot org
  2004-05-16 21:42 ` tobi at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-16 20:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-05-15 18:02 -------
Subject: Bug 13826

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tobi@gcc.gnu.org	2004-05-15 18:02:20

Modified files:
	gcc/fortran    : ChangeLog match.c match.h primary.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.fortran-torture/compile: data_1.f90 

Log message:
	fortran:
	PR fortran/13826
	* primary.c (match_structure_constructor): Rename ...
	(gfc_match_structure_constructor): ... to this. Make non-static.
	(gfc_match_rvalue): Call renamed function.
	* match.h (gfc_match_structure_constructor): Declare.
	* match.c (gfc_match_data_constant): Handle structure
	constructor.
	
	testsuite:
	PR fortran/13826
	* gfortran.fortran-torture/compile/data_1.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.17&r2=1.18
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.c.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.h.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/primary.c.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3751&r2=1.3752
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.fortran-torture/compile/data_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug fortran/13826] [gfortran] Derived types in DATA statements not PARAMETERs
  2004-01-23  6:22 [Bug fortran/13826] New: Derived types in DATA statements not PARAMETERs giese025 at tc dot umn dot edu
                   ` (6 preceding siblings ...)
  2004-05-16 20:30 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-16 20:43 ` cvs-commit at gcc dot gnu dot org
  2004-05-16 21:42 ` tobi at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-16 20:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-05-15 18:10 -------
Subject: Bug 13826

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tobi@gcc.gnu.org	2004-05-15 18:10:07

Modified files:
	gcc/fortran    : ChangeLog primary.c 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/gfortran.fortran-torture/compile: data_1.f90 

Log message:
	testsuite:
	PR fortran/13826
	PR fortran/13940
	* gfortran.fortran-torture/compile/data_1.f90: New test.
	(add second test)
	
	fortran:
	* primary.c (match_boz_constant): Use gfc_notify_std() for
	issuing a warning or an error.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.18&r2=1.19
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/primary.c.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3752&r2=1.3753
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.fortran-torture/compile/data_1.f90.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


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


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

* [Bug fortran/13826] [gfortran] Derived types in DATA statements not PARAMETERs
  2004-01-23  6:22 [Bug fortran/13826] New: Derived types in DATA statements not PARAMETERs giese025 at tc dot umn dot edu
                   ` (7 preceding siblings ...)
  2004-05-16 20:43 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-16 21:42 ` tobi at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-05-16 21:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-05-15 20:34 -------
Fixed by the previous commits.

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


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


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

end of thread, other threads:[~2004-05-15 20:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-23  6:22 [Bug fortran/13826] New: Derived types in DATA statements not PARAMETERs giese025 at tc dot umn dot edu
2004-01-23  6:24 ` [Bug fortran/13826] " giese025 at tc dot umn dot edu
2004-01-23  6:25 ` [Bug fortran/13826] [gfortran] " pinskia at gcc dot gnu dot org
2004-01-23  6:26 ` giese025 at tc dot umn dot edu
2004-01-25 17:44 ` dhazeghi at yahoo dot com
2004-04-26  5:20 ` pinskia at gcc dot gnu dot org
2004-05-12 15:52 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-05-16 20:30 ` cvs-commit at gcc dot gnu dot org
2004-05-16 20:43 ` cvs-commit at gcc dot gnu dot org
2004-05-16 21:42 ` tobi 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).