Bug 13742 - Not Implemented: initial values for COMMON or EQUIVALENCE
Summary: Not Implemented: initial values for COMMON or EQUIVALENCE
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: tree-ssa
: P2 normal
Target Milestone: 4.0.0
Assignee: Victor Leikehman
URL:
Keywords: FIXME, ice-on-valid-code, patch
Depends on:
Blocks: 15502
  Show dependency treegraph
 
Reported: 2004-01-19 15:24 UTC by Victor Leikehman
Modified: 2005-11-10 16:36 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2004-04-26 04:11:43


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Leikehman 2004-01-19 15:24:26 UTC
While there are many unimplemented features, this one is special
because it prevents compiling a SPEC2000 benchmark (facerec). 

% cat foo.f90
        PROGRAM
          INTEGER :: X = 123
          INTEGER :: Y
          EQUIVALENCE (X,Y)
          PRINT *, X
        END PROGRAM

% gfortran foo.f90 
foo.f90: In function `MAIN__':
foo.f90:6: fatal error: gfc_todo: Not Implemented: initial values for COMMON or
EQUIVALENCE
compilation terminated.
Comment 1 Andrew Pinski 2004-01-19 15:31:41 UTC
Already known, confirmed.
Comment 2 Andrew Pinski 2004-05-05 06:57:52 UTC
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00219.html>.
Comment 3 GCC Commits 2004-05-15 20:29:09 UTC
Subject: Bug 13742

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

Modified files:
	gcc/fortran    : ChangeLog decl.c match.c 

Log message:
	PR fortran/13742
	* decl.c (add_init_expr_to_sym): Verify that COMMON variable is
	not initialized in a disallowed fashion.
	* match.c (gfc_match_common): Likewise.
	(var_element): Verify that variable is not in the blank COMMON,
	if it is in a common.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.21&r2=1.22
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/decl.c.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.c.diff?cvsroot=gcc&r1=1.7&r2=1.8

Comment 4 Paul Brook 2004-05-23 15:16:00 UTC
Fixed, although some more complicated cases are still not implemented.