public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18827] New: compiler segfault on assign to common variable
@ 2004-12-04 12:41 Thomas dot Koenig at online dot de
  2004-12-04 12:42 ` [Bug fortran/18827] ICE " Thomas dot Koenig at online dot de
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-04 12:41 UTC (permalink / raw)
  To: gcc-bugs

$ cat assign3.f
      program main
      integer*4 i
      common /foo/ i
      assign 1000 to i
 1000 continue
      end
$ gfortran assign3.f
 In file assign3.f:4

      assign 1000 to i
                                                                       1
Warning: Obsolete: ASSIGN statement at (1)
assign3.f: In function 'MAIN__':
assign3.f:4: internal compiler error: tree check: expected class
'declaration',have 'reference' (component_ref) in gfc_trans_label_assign, at
fortran/trans-stmt.c:101
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$ gfortran -v
Reading specs from /home/ig25/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure --prefix=/home/ig25
--enable-languages=c,c++,f95 --disable-shared
Thread model: posix
gcc version 4.0.0 20041204 (experimental)

-- 
           Summary: compiler segfault on assign to common variable
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Thomas dot Koenig at online dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug fortran/18827] ICE on assign to common variable
  2004-12-04 12:41 [Bug fortran/18827] New: compiler segfault on assign to common variable Thomas dot Koenig at online dot de
@ 2004-12-04 12:42 ` Thomas dot Koenig at online dot de
  2004-12-04 13:16 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-04 12:42 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|compiler segfault on assign |ICE on assign to common
                   |to common variable          |variable


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


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

* [Bug fortran/18827] ICE on assign to common variable
  2004-12-04 12:41 [Bug fortran/18827] New: compiler segfault on assign to common variable Thomas dot Koenig at online dot de
  2004-12-04 12:42 ` [Bug fortran/18827] ICE " Thomas dot Koenig at online dot de
@ 2004-12-04 13:16 ` pinskia at gcc dot gnu dot org
  2004-12-04 14:57 ` Thomas dot Koenig at online dot de
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-04 13:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-04 13:16 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-04 13:16:07
               date|                            |


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


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

* [Bug fortran/18827] ICE on assign to common variable
  2004-12-04 12:41 [Bug fortran/18827] New: compiler segfault on assign to common variable Thomas dot Koenig at online dot de
  2004-12-04 12:42 ` [Bug fortran/18827] ICE " Thomas dot Koenig at online dot de
  2004-12-04 13:16 ` pinskia at gcc dot gnu dot org
@ 2004-12-04 14:57 ` Thomas dot Koenig at online dot de
  2004-12-10 14:58 ` wf_cs at yahoo dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-04 14:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Thomas dot Koenig at online dot de  2004-12-04 14:56 -------
The same bug is triggered if the assigned variable
is equivalenced:

$ cat assign4.f
      program main
      integer i
      integer j
      equivalence (i,j)
      assign 1000 to i
      goto j
 1000 continue
      end
$ gfortran assign4.f
 In file assign4.f:5

      assign 1000 to i
                                                                       1
Warning: Obsolete: ASSIGN statement at (1)
 In file assign4.f:6

      goto j
           1
Warning: Obsolete: Assigned GOTO statement at (1)
assign4.f: In function 'MAIN__':
assign4.f:5: internal compiler error: tree check: expected class
'declaration',have 'reference' (component_ref) in gfc_trans_label_assign, at
fortran/trans-stmt.c:101
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


-- 


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


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

* [Bug fortran/18827] ICE on assign to common variable
  2004-12-04 12:41 [Bug fortran/18827] New: compiler segfault on assign to common variable Thomas dot Koenig at online dot de
                   ` (2 preceding siblings ...)
  2004-12-04 14:57 ` Thomas dot Koenig at online dot de
@ 2004-12-10 14:58 ` wf_cs at yahoo dot com
  2005-01-06 14:43 ` tobi at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: wf_cs at yahoo dot com @ 2004-12-10 14:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wf_cs at yahoo dot com  2004-12-10 14:58 -------
I've fixed the first and am looking into the second. I think the second 
(variable with equivalence)is an invalid code. ifort also gives an error.

-- 


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


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

* [Bug fortran/18827] ICE on assign to common variable
  2004-12-04 12:41 [Bug fortran/18827] New: compiler segfault on assign to common variable Thomas dot Koenig at online dot de
                   ` (3 preceding siblings ...)
  2004-12-10 14:58 ` wf_cs at yahoo dot com
@ 2005-01-06 14:43 ` tobi at gcc dot gnu dot org
  2005-01-23 11:36 ` wf_cs at yahoo dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-01-06 14:43 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |19292
              nThis|                            |


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


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

* [Bug fortran/18827] ICE on assign to common variable
  2004-12-04 12:41 [Bug fortran/18827] New: compiler segfault on assign to common variable Thomas dot Koenig at online dot de
                   ` (4 preceding siblings ...)
  2005-01-06 14:43 ` tobi at gcc dot gnu dot org
@ 2005-01-23 11:36 ` wf_cs at yahoo dot com
  2005-03-15  2:52 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: wf_cs at yahoo dot com @ 2005-01-23 11:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wf_cs at yahoo dot com  2005-01-23 11:36 -------
http://gcc.gnu.org/ml/fortran/2004-12/msg00136.html
http://gcc.gnu.org/ml/fortran/2005-01/msg00118.html

-- 


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


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

* [Bug fortran/18827] ICE on assign to common variable
  2004-12-04 12:41 [Bug fortran/18827] New: compiler segfault on assign to common variable Thomas dot Koenig at online dot de
                   ` (5 preceding siblings ...)
  2005-01-23 11:36 ` wf_cs at yahoo dot com
@ 2005-03-15  2:52 ` cvs-commit at gcc dot gnu dot org
  2005-03-15  3:43 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-15  2:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-15 02:52 -------
Subject: Bug 18827

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	fengwang@gcc.gnu.org	2005-03-15 02:52:38

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/fortran    : ChangeLog io.c match.c resolve.c trans-common.c 
	                 trans-stmt.c trans-io.c trans.h 
Added files:
	gcc/testsuite/gfortran.dg: assign.f90 assign_2.f90 assign_3.f90 

Log message:
	fortran/
	2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
	
	PR fortran/18827
	* io.c (resolve_tag): Add checking on assigned label.
	(match_dt_format): Does not set symbol assign attribute.
	* match.c (gfc_match_goto):Does not set symbol assign attribute.
	* resolve.c (resolve_code): Add checking on assigned label.
	* trans-common.c (build_field): Deals with common variable assigned
	a label.
	* trans-stmt.c (gfc_conv_label_variable): New function.
	(gfc_trans_label_assign): Use it.
	(gfc_trans_goto): Ditto.
	* trans-io.c (set_string): Ditto.
	* trans.h (gfc_conv_label_variable): Add prototype.
	testsuite/
	2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
	
	PR fortran/18827
	* gfortran.dg/assign_2.f90: New test.
	* gfortran.dg/assign_3.f90: New test.
	* gfortran.dg/assign.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5169&r2=1.5170
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/assign.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/assign_2.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/assign_3.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.353&r2=1.354
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/io.c.diff?cvsroot=gcc&r1=1.19&r2=1.20
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.c.diff?cvsroot=gcc&r1=1.31&r2=1.32
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/resolve.c.diff?cvsroot=gcc&r1=1.37&r2=1.38
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-common.c.diff?cvsroot=gcc&r1=1.24&r2=1.25
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-stmt.c.diff?cvsroot=gcc&r1=1.24&r2=1.25
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-io.c.diff?cvsroot=gcc&r1=1.33&r2=1.34
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans.h.diff?cvsroot=gcc&r1=1.24&r2=1.25



-- 


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


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

* [Bug fortran/18827] ICE on assign to common variable
  2004-12-04 12:41 [Bug fortran/18827] New: compiler segfault on assign to common variable Thomas dot Koenig at online dot de
                   ` (6 preceding siblings ...)
  2005-03-15  2:52 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-15  3:43 ` cvs-commit at gcc dot gnu dot org
  2005-03-16  0:19 ` fengwang at gcc dot gnu dot org
  2005-03-16  0:25 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-15  3:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-15 03:43 -------
Subject: Bug 18827

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	fengwang@gcc.gnu.org	2005-03-15 03:42:49

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/fortran    : ChangeLog io.c match.c resolve.c trans-common.c 
	                 trans-stmt.c trans-io.c trans.h 
Added files:
	gcc/testsuite/gfortran.dg: assign.f90 assign_2.f90 assign_3.f90 

Log message:
	fortran/
	2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
	
	PR fortran/18827
	* io.c (resolve_tag): Add checking on assigned label.
	(match_dt_format): Does not set symbol assign attribute.
	* match.c (gfc_match_goto):Does not set symbol assign attribute.
	* resolve.c (resolve_code): Add checking on assigned label.
	* trans-common.c (build_field): Deals with common variable assigned
	a label.
	* trans-stmt.c (gfc_conv_label_variable): New function.
	(gfc_trans_label_assign): Use it.
	(gfc_trans_goto): Ditto.
	* trans-io.c (set_string): Ditto.
	* trans.h (gfc_conv_label_variable): Add prototype.
	testsuite/
	2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
	
	PR fortran/18827
	* gfortran.dg/assign_2.f90: New test.
	* gfortran.dg/assign_3.f90: New test.
	* gfortran.dg/assign.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.47&r2=1.5084.2.48
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/assign.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/assign_2.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/assign_3.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
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.13&r2=1.335.2.14
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/io.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.19&r2=1.19.10.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.31&r2=1.31.8.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/resolve.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.34.2.3&r2=1.34.2.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-common.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.23.2.1&r2=1.23.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-stmt.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.24&r2=1.24.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-io.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.33&r2=1.33.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.23.2.1&r2=1.23.2.2



-- 


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


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

* [Bug fortran/18827] ICE on assign to common variable
  2004-12-04 12:41 [Bug fortran/18827] New: compiler segfault on assign to common variable Thomas dot Koenig at online dot de
                   ` (7 preceding siblings ...)
  2005-03-15  3:43 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-16  0:19 ` fengwang at gcc dot gnu dot org
  2005-03-16  0:25 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: fengwang at gcc dot gnu dot org @ 2005-03-16  0:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fengwang at gcc dot gnu dot org  2005-03-16 00:19 -------
Fixed

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


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


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

* [Bug fortran/18827] ICE on assign to common variable
  2004-12-04 12:41 [Bug fortran/18827] New: compiler segfault on assign to common variable Thomas dot Koenig at online dot de
                   ` (8 preceding siblings ...)
  2005-03-16  0:19 ` fengwang at gcc dot gnu dot org
@ 2005-03-16  0:25 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-16  0:25 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


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


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

end of thread, other threads:[~2005-03-16  0:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-04 12:41 [Bug fortran/18827] New: compiler segfault on assign to common variable Thomas dot Koenig at online dot de
2004-12-04 12:42 ` [Bug fortran/18827] ICE " Thomas dot Koenig at online dot de
2004-12-04 13:16 ` pinskia at gcc dot gnu dot org
2004-12-04 14:57 ` Thomas dot Koenig at online dot de
2004-12-10 14:58 ` wf_cs at yahoo dot com
2005-01-06 14:43 ` tobi at gcc dot gnu dot org
2005-01-23 11:36 ` wf_cs at yahoo dot com
2005-03-15  2:52 ` cvs-commit at gcc dot gnu dot org
2005-03-15  3:43 ` cvs-commit at gcc dot gnu dot org
2005-03-16  0:19 ` fengwang at gcc dot gnu dot org
2005-03-16  0:25 ` pinskia 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).