public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/14976] New: [gfortran] .space is wrong
@ 2004-04-16 16:06 pinskia at gcc dot gnu dot org
  2004-04-16 16:20 ` [Bug fortran/14976] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-16 16:06 UTC (permalink / raw)
  To: gcc-bugs

Try to compile the following program you will see that a .space is wrong and will as 
complain and not assemble the code.  g77 does the right thing.  This testcase is from PR 
12884.

       IMPLICIT NONE
C properly handle a "/" in a $<NAME> $END namelist
C pr12884 --
C error in reading a namelist when it is preceded by a line with a SLASH
C
       CHARACTER*80 DL(7)
       DATA DL /'$file',
     1          'oms omsmc.i2',
     2          'pseu pseudo/PSN',
     3          '$end',
     4          '$CNTRL',
     5          'ispher=1,NOSYM=2,RUNFLG=3,noprop=4,',
     6          '$END'/
C $file is not a valid namelist, but it still
C is parsed by the runtime
       INTEGER*4 ISPHER,NOSYM,RUNFLG,NOPROP /-1 /
       INTEGER I
       NAMELIST /CNTRL/ ISPHER,NOSYM,RUNFLG,NOPROP
C make a unique datafile
       OPEN(UNIT=9,STATUS='SCRATCH')
       WRITE(9,*,ERR=100)(DL(I),I=1,7)
       REWIND(9)
       READ(9,NML=CNTRL,ERR=100)
       CLOSE(9)
       IF (ISPHER.NE.1.OR.NOSYM.NE.2.OR.RUNFLG.NE.3.OR.NOPROP.NE.4)THEN
           CALL ABORT
       ENDIF
C all is well at this point !!
       STOP
 100   PRINT*,'FILE ERROR(S)'
       CALL ABORT 
       END

-- 
           Summary: [gfortran] .space is wrong
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug fortran/14976] [gfortran] .space is wrong
  2004-04-16 16:06 [Bug fortran/14976] New: [gfortran] .space is wrong pinskia at gcc dot gnu dot org
@ 2004-04-16 16:20 ` pinskia at gcc dot gnu dot org
  2004-04-26 13:25 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-16 16:20 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug fortran/14976] [gfortran] .space is wrong
  2004-04-16 16:06 [Bug fortran/14976] New: [gfortran] .space is wrong pinskia at gcc dot gnu dot org
  2004-04-16 16:20 ` [Bug fortran/14976] " pinskia at gcc dot gnu dot org
@ 2004-04-26 13:25 ` pinskia at gcc dot gnu dot org
  2004-05-17  6:26 ` tobi at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-26 13:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-26 13:06 -------
I forgot one thing, change "NOPROP /-1 / " to "NOPROP".
Confirmed on i686-pc-linux-gnu and powerpc-apple-darwin.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-26 13:06:47
               date|                            |


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


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

* [Bug fortran/14976] [gfortran] .space is wrong
  2004-04-16 16:06 [Bug fortran/14976] New: [gfortran] .space is wrong pinskia at gcc dot gnu dot org
  2004-04-16 16:20 ` [Bug fortran/14976] " pinskia at gcc dot gnu dot org
  2004-04-26 13:25 ` pinskia at gcc dot gnu dot org
@ 2004-05-17  6:26 ` tobi at gcc dot gnu dot org
  2004-06-01  2:26 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-05-17  6:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-05-16 20:18 -------
Reduced testcase:
       CHARACTER*80 DL(2)
       DATA DL /'$file',
     1          'oms omsmc.i2'/

       dl(1) = "HI"
       END
The assembly generated for
 DATA DL /'$file',
looks like 
        .ascii  "$file"
        .zero   75
        .zero   4294967228        ;; asm complains here
Where does the second .zero come from?

This doesn't happen if dl is a scalar.

-- 


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


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

* [Bug fortran/14976] [gfortran] .space is wrong
  2004-04-16 16:06 [Bug fortran/14976] New: [gfortran] .space is wrong pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-05-17  6:26 ` tobi at gcc dot gnu dot org
@ 2004-06-01  2:26 ` pinskia at gcc dot gnu dot org
  2004-06-13 18:00 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-01  2:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-01 02:26 -------
I should not that causes it be an error on Darwin.

-- 


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


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

* [Bug fortran/14976] [gfortran] .space is wrong
  2004-04-16 16:06 [Bug fortran/14976] New: [gfortran] .space is wrong pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-06-01  2:26 ` pinskia at gcc dot gnu dot org
@ 2004-06-13 18:00 ` pinskia at gcc dot gnu dot org
  2004-06-28  7:28 ` [Bug fortran/14976] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-13 18:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-13 18:00 -------
*** Bug 15974 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Mart dot Rentmeester at nn-
                   |                            |online dot org


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


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

* [Bug fortran/14976] .space is wrong
  2004-04-16 16:06 [Bug fortran/14976] New: [gfortran] .space is wrong pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-06-13 18:00 ` pinskia at gcc dot gnu dot org
@ 2004-06-28  7:28 ` pinskia at gcc dot gnu dot org
  2004-08-19 16:45 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-28  7:28 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.5.0                       |---


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


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

* [Bug fortran/14976] .space is wrong
  2004-04-16 16:06 [Bug fortran/14976] New: [gfortran] .space is wrong pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-06-28  7:28 ` [Bug fortran/14976] " pinskia at gcc dot gnu dot org
@ 2004-08-19 16:45 ` cvs-commit at gcc dot gnu dot org
  2004-08-19 16:53 ` [Bug libfortran/14976] REWIND erases file pbrook at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-19 16:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-08-19 16:45 -------
Subject: Bug 14976

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pbrook@gcc.gnu.org	2004-08-19 16:45:21

Modified files:
	gcc/fortran    : ChangeLog data.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: data_char_1.f90 

Log message:
	PR fortran/14976
	PR fortran/16228
	* data.c (assign_substring_data_value): Remove.
	(create_character_intializer): New function.
	(gfc_assign_data_value): Track the typespec for the current
	subobject.  Use create_character_intializer.
	testsuite/
	* gfortran.dg/data_char_1.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.154&r2=1.155
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/data.c.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4160&r2=1.4161
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/data_char_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug libfortran/14976] REWIND erases file
  2004-04-16 16:06 [Bug fortran/14976] New: [gfortran] .space is wrong pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-08-19 16:45 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-19 16:53 ` pbrook at gcc dot gnu dot org
  2004-08-20 14:39 ` [Bug libfortran/14976] NAMELIST does not support "$" syntax bdavis at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2004-08-19 16:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pbrook at gcc dot gnu dot org  2004-08-19 16:53 -------
Partially fixed. 
Changed component and subject to reflect this. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|fortran                     |libfortran
            Summary|.space is wrong             |REWIND erases file


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


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

* [Bug libfortran/14976] NAMELIST does not support "$" syntax
  2004-04-16 16:06 [Bug fortran/14976] New: [gfortran] .space is wrong pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2004-08-19 16:53 ` [Bug libfortran/14976] REWIND erases file pbrook at gcc dot gnu dot org
@ 2004-08-20 14:39 ` bdavis at gcc dot gnu dot org
  2004-08-21 14:06 ` bdavis at gcc dot gnu dot org
  2004-08-21 15:28 ` [Bug fortran/14976] .space is wrong pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-08-20 14:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bdavis at gcc dot gnu dot org  2004-08-20 14:38 -------
looked into this a bit after Paul fixed the other problems. 

this code has two things in it that do not work yet in gfortran.

#1.  $ syntax.  the parser now only accepts & syntax.
#2.  the first string , $file , looks like a namelist but it is not. g77/f2c was
sophisticated enough to catch this and continue parsing the file.

changed the summary to more accurately reflect the current problem.

--bud davis



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|REWIND erases file          |NAMELIST does not support
                   |                            |"$" syntax


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


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

* [Bug libfortran/14976] NAMELIST does not support "$" syntax
  2004-04-16 16:06 [Bug fortran/14976] New: [gfortran] .space is wrong pinskia at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2004-08-20 14:39 ` [Bug libfortran/14976] NAMELIST does not support "$" syntax bdavis at gcc dot gnu dot org
@ 2004-08-21 14:06 ` bdavis at gcc dot gnu dot org
  2004-08-21 15:28 ` [Bug fortran/14976] .space is wrong pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-08-21 14:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bdavis at gcc dot gnu dot org  2004-08-21 14:06 -------
umm.. this is really a dup of pr 12884.

--bud

-- 


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


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

* [Bug fortran/14976] .space is wrong
  2004-04-16 16:06 [Bug fortran/14976] New: [gfortran] .space is wrong pinskia at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2004-08-21 14:06 ` bdavis at gcc dot gnu dot org
@ 2004-08-21 15:28 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-21 15:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-21 15:28 -------
Yes it was a dup of that bug because I wantted a bug for the .space issue seperate from the libgfortran 
one.  So closing this as fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |12884
              nThis|                            |
             Status|NEW                         |RESOLVED
          Component|libfortran                  |fortran
         Resolution|                            |FIXED
            Summary|NAMELIST does not support   |.space is wrong
                   |"$" syntax                  |
   Target Milestone|---                         |3.5.0


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


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

end of thread, other threads:[~2004-08-21 15:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-16 16:06 [Bug fortran/14976] New: [gfortran] .space is wrong pinskia at gcc dot gnu dot org
2004-04-16 16:20 ` [Bug fortran/14976] " pinskia at gcc dot gnu dot org
2004-04-26 13:25 ` pinskia at gcc dot gnu dot org
2004-05-17  6:26 ` tobi at gcc dot gnu dot org
2004-06-01  2:26 ` pinskia at gcc dot gnu dot org
2004-06-13 18:00 ` pinskia at gcc dot gnu dot org
2004-06-28  7:28 ` [Bug fortran/14976] " pinskia at gcc dot gnu dot org
2004-08-19 16:45 ` cvs-commit at gcc dot gnu dot org
2004-08-19 16:53 ` [Bug libfortran/14976] REWIND erases file pbrook at gcc dot gnu dot org
2004-08-20 14:39 ` [Bug libfortran/14976] NAMELIST does not support "$" syntax bdavis at gcc dot gnu dot org
2004-08-21 14:06 ` bdavis at gcc dot gnu dot org
2004-08-21 15:28 ` [Bug fortran/14976] .space is wrong 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).