public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18481] New: ICE with integer variable "format"
@ 2004-11-14 20:37 Thomas dot Koenig at online dot de
  2004-11-14 22:25 ` [Bug fortran/18481] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-11-14 20:37 UTC (permalink / raw)
  To: gcc-bugs

This looks a lot like PR18023, but with WRITE instead of PRINT,
and the ICE is different from PR18476.

$ 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 : (reconfigured) ../gcc/configure
--prefix=/home/ig25 --with-gcc-version-trigger=/home/ig25/gcc/gcc/version.c
--enable-languages=c,c++,f95 --no-create --no-recursion
Thread model: posix
gcc version 4.0.0 20041114 (experimental)
$ cat format-int.f90
program internal
  integer k
  character(len=80) chr
  read(chr,k)
end program internal
$ gfortran format-int.f90
format-int.f90: In function 'MAIN__':
format-int.f90:4: internal compiler error: in gfc_add_modify_expr, at
fortran/trans.c:154
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 
           Summary: ICE with integer variable "format"
           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=18481


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

* [Bug fortran/18481] ICE with integer variable "format"
  2004-11-14 20:37 [Bug fortran/18481] New: ICE with integer variable "format" Thomas dot Koenig at online dot de
@ 2004-11-14 22:25 ` pinskia at gcc dot gnu dot org
  2004-12-04 10:37 ` [Bug fortran/18481] [g77 regression] ICE with assigned integer variable format Thomas dot Koenig at online dot de
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-14 22:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-14 22:25 -------
Confirmed.
Looks like NIST f77 has the same ICE (from PR 17423):
FM020.f:177: internal compiler error: in gfc_add_modify_expr, at fortran/trans.c:154
FM311.f:401: internal compiler error: in gfc_add_modify_expr, at fortran/trans.c:154
FM328.f:465: internal compiler error: in gfc_add_modify_expr, at fortran/trans.c:154

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-14 22:25:32
               date|                            |


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


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

* [Bug fortran/18481] [g77 regression] ICE with assigned integer variable format
  2004-11-14 20:37 [Bug fortran/18481] New: ICE with integer variable "format" Thomas dot Koenig at online dot de
  2004-11-14 22:25 ` [Bug fortran/18481] " pinskia at gcc dot gnu dot org
@ 2004-12-04 10:37 ` Thomas dot Koenig at online dot de
  2005-01-06 14:43 ` tobi at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-04 10:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Thomas dot Koenig at online dot de  2004-12-04 10:37 -------
This does indeed appear to be the problem
with quite a few failing NIST tests.  Here's
a reduced testcase from NIST 111.  The test case
in question has the comment

C*****    -  USE AS A FORMAT AN INTEGER VARIABLE WHOSE VALUE  10.3      02280111
C*****       IS ASSIGNED USING AN ASSIGNMENT STATEMENT.       12.4(2)   02290111

so I guess this must be legal.  It also works with g77.

$ cat assign.f
      program main
      assign 9000 to i
      print i,3.14
 9000 format ('real value = ', g12.5)
      end
$ g77 assign.f && ./a.out
real value =   3.1400
$ gfortran assign.f
 In file assign.f:2

      assign 9000 to i
                                                                       1
Warning: Obsolete: ASSIGN statement at (1)
assign.f: In function 'MAIN__':
assign.f:2: internal compiler error: in gfc_add_modify_expr, at fortran/trans.c:154
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Same error for print instead of write.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE with integer variable   |[g77 regression] ICE with
                   |"format"                    |assigned integer variable
                   |                            |format


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


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

* [Bug fortran/18481] [g77 regression] ICE with assigned integer variable format
  2004-11-14 20:37 [Bug fortran/18481] New: ICE with integer variable "format" Thomas dot Koenig at online dot de
  2004-11-14 22:25 ` [Bug fortran/18481] " pinskia at gcc dot gnu dot org
  2004-12-04 10:37 ` [Bug fortran/18481] [g77 regression] ICE with assigned integer variable format Thomas dot Koenig at online dot de
@ 2005-01-06 14:43 ` tobi at gcc dot gnu dot org
  2005-04-01 11:45 ` Thomas dot Koenig at online dot de
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ 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=18481


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

* [Bug fortran/18481] [g77 regression] ICE with assigned integer variable format
  2004-11-14 20:37 [Bug fortran/18481] New: ICE with integer variable "format" Thomas dot Koenig at online dot de
                   ` (2 preceding siblings ...)
  2005-01-06 14:43 ` tobi at gcc dot gnu dot org
@ 2005-04-01 11:45 ` Thomas dot Koenig at online dot de
  2005-04-25  0:31 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-04-01 11:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Thomas dot Koenig at online dot de  2005-04-01 11:45 -------
No write or print statement is necessary:

$ cat assign.f90
      program main
      assign 1000 to i
 1000 format (A)
      end
$ gfortran assign.f90
$ gfortran -fdump-parse-tree assign.f90
 In file assign.f90:2

      assign 1000 to i
                     1
Warning: Obsolete: ASSIGN statement at (1)

        Namespace: A-H: (REAL 4) I-N: (INTEGER 4) O-Z: (REAL 4)
        symtree: i  Ambig 0
        symbol i (INTEGER 4)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC
IMPLICIT-TYPE)

        symtree: main  Ambig 0
        symbol main (UNKNOWN 0)(PROGRAM UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC)


      LABEL ASSIGN i 1000

assign.f90: In function 'MAIN__':
assign.f90:2: internal compiler error: in gfc_add_modify_expr, at
fortran/trans.c:152
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$
$ gfortran -v
Using built-in specs.
Target: ia64-unknown-linux-gnu
Configured with: ../gcc-4.1-20050327/configure --prefix=/home/zfkts
--enable-languages=c,f95
Thread model: posix
gcc version 4.1.0 20050327 (experimental)


-- 


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


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

* [Bug fortran/18481] [g77 regression] ICE with assigned integer variable format
  2004-11-14 20:37 [Bug fortran/18481] New: ICE with integer variable "format" Thomas dot Koenig at online dot de
                   ` (3 preceding siblings ...)
  2005-04-01 11:45 ` Thomas dot Koenig at online dot de
@ 2005-04-25  0:31 ` pinskia at gcc dot gnu dot org
  2005-05-25 11:11 ` fengwang at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-25  0:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-25 00:30 -------
*** Bug 21199 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at verizon dot net


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


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

* [Bug fortran/18481] [g77 regression] ICE with assigned integer variable format
  2004-11-14 20:37 [Bug fortran/18481] New: ICE with integer variable "format" Thomas dot Koenig at online dot de
                   ` (4 preceding siblings ...)
  2005-04-25  0:31 ` pinskia at gcc dot gnu dot org
@ 2005-05-25 11:11 ` fengwang at gcc dot gnu dot org
  2005-06-06  0:43 ` pinskia at gcc dot gnu dot org
  2005-07-07  9:56 ` fengwang at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: fengwang at gcc dot gnu dot org @ 2005-05-25 11:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fengwang at gcc dot gnu dot org  2005-05-25 10:45 -------
Issues (#2, #3) related ASSIGN statement should be fixed by
http://gcc.gnu.org/ml/fortran/2005-05/msg00054.html [committed].

Issue in the description should be fixed by
http://gcc.gnu.org/ml/fortran/2005-05/msg00280.html [under reviewing].

-- 


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


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

* [Bug fortran/18481] [g77 regression] ICE with assigned integer variable format
  2004-11-14 20:37 [Bug fortran/18481] New: ICE with integer variable "format" Thomas dot Koenig at online dot de
                   ` (5 preceding siblings ...)
  2005-05-25 11:11 ` fengwang at gcc dot gnu dot org
@ 2005-06-06  0:43 ` pinskia at gcc dot gnu dot org
  2005-07-07  9:56 ` fengwang at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-06  0:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-06 00:43 -------
The example in comment #0, I get the following error:
 In file t.f:4

  read(chr,k)
          1
Error: Variable 'k' has not been assigned a format label at (1)

-- 


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


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

* [Bug fortran/18481] [g77 regression] ICE with assigned integer variable format
  2004-11-14 20:37 [Bug fortran/18481] New: ICE with integer variable "format" Thomas dot Koenig at online dot de
                   ` (6 preceding siblings ...)
  2005-06-06  0:43 ` pinskia at gcc dot gnu dot org
@ 2005-07-07  9:56 ` fengwang at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: fengwang at gcc dot gnu dot org @ 2005-07-07  9:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fengwang at gcc dot gnu dot org  2005-07-07 09:56 -------
(In reply to comment #6)
> The example in comment #0, I get the following error:
>  In file t.f:4
>   read(chr,k)
>           1
> Error: Variable 'k' has not been assigned a format label at (1)

Fixed. They are all fixed by:

http://gcc.gnu.org/ml/fortran/2005-05/msg00054.html

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


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


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

end of thread, other threads:[~2005-07-07  9:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-14 20:37 [Bug fortran/18481] New: ICE with integer variable "format" Thomas dot Koenig at online dot de
2004-11-14 22:25 ` [Bug fortran/18481] " pinskia at gcc dot gnu dot org
2004-12-04 10:37 ` [Bug fortran/18481] [g77 regression] ICE with assigned integer variable format Thomas dot Koenig at online dot de
2005-01-06 14:43 ` tobi at gcc dot gnu dot org
2005-04-01 11:45 ` Thomas dot Koenig at online dot de
2005-04-25  0:31 ` pinskia at gcc dot gnu dot org
2005-05-25 11:11 ` fengwang at gcc dot gnu dot org
2005-06-06  0:43 ` pinskia at gcc dot gnu dot org
2005-07-07  9:56 ` fengwang 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).