Bug 19936 - confused error message about implied do loop
Summary: confused error message about implied do loop
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.0
: P3 enhancement
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2005-02-13 11:09 UTC by Thomas Koenig
Modified: 2005-03-05 23:46 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-02-13 14:11:10


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Koenig 2005-02-13 11:09:01 UTC
$ cat implied_parameter.f90
program main
  integer, parameter :: i=4
  print *,(/(i,i=1,4)/)
end program main
$ gfortran implied_parameter.f90
 In file implied_parameter.f90:3

  print *,(/(i,i=1,4)/)
               1
Error: Syntax error in COMPLEX constant at (1)
$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/home/ig25 --enable-languages=c,f95
Thread model: posix
gcc version 4.0.0 20050212 (experimental)
Comment 1 Andrew Pinski 2005-02-13 14:11:10 UTC
Confirmed.
Comment 2 Steve Kargl 2005-02-13 18:00:28 UTC
For a long winded explanation and patch, see

http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00643.html
Comment 3 GCC Commits 2005-03-05 23:35:54 UTC
Subject: Bug 19936

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	kargl@gcc.gnu.org	2005-03-05 23:35:46

Modified files:
	gcc/fortran    : ChangeLog primary.c 

Log message:
	PR 19936
	* primary.c (match_complex_constant): Mangled complex constant may
	be an implied do-loop.  Give implied do-loop matcher a chance.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.345&r2=1.346
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/primary.c.diff?cvsroot=gcc&r1=1.23&r2=1.24

Comment 4 GCC Commits 2005-03-05 23:39:59 UTC
Subject: Bug 19936

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	kargl@gcc.gnu.org	2005-03-05 23:39:52

Modified files:
	gcc/fortran    : ChangeLog primary.c 

Log message:
	PR fortran/19936
	* primary.c (match_complex_constant): Mangled complex constant may
	be an implied do-loop.  Give implied do-loop matcher a chance.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.335.2.8&r2=1.335.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/primary.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.22.2.1&r2=1.22.2.2

Comment 5 kargls 2005-03-05 23:46:14 UTC
Fixed.  A saner error message is generated for mangled implied-do loops.