[Bug fortran/33108] New: unformatted string write errors with End of record.

2007-08-18 Thread dagurasu15 at hotmail dot com
program writebug
   character*40 string1
   character*40 string2
   write(string1,*)string2
   end

compiled with no options with gfortran this results in:

At line 4 of file test.f
Fortran runtime error: End of record

Either increasing the size of string1 to 41 or using a formatted write fixes
the problem.  This smells like null termination issue maybe?  Fortran isn't
supposed to leave space for null characters though.  Anyway, this same code
works fine with f77 in gcc 3.4.4.


-- 
   Summary: unformatted string write errors with End of record.
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dagurasu15 at hotmail dot com
  GCC host triplet: P4


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



[Bug fortran/33108] unformatted string write errors with End of record.

2007-08-18 Thread dagurasu15 at hotmail dot com


--- Comment #2 from dagurasu15 at hotmail dot com  2007-08-18 17:48 ---
OK, I don't remember these spaces but you may be right.  Also, thinking about
it, g77 doesn't detect these types of runtime errors well, maybe it didn't
really work.  Let me rerun with some print statements on the old compiler and
post back how that worked.  This could indeed be user error.


-- 


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



[Bug fortran/33108] unformatted string write errors with End of record.

2007-08-18 Thread dagurasu15 at hotmail dot com


--- Comment #3 from dagurasu15 at hotmail dot com  2007-08-18 17:55 ---

As it turns out (not surprisingly), you are correct.  It never did work, just
the old compiler didn't catch the runtime error.  I usually use a left justify
routine on my strings in the end so I never noticed the space or the array
overwrite.  So this it turns out is indeed a feature, and a good one, not a
bug.  Sorry for the noise.  Thanks.


-- 


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



[Bug fortran/33108] unformatted string write errors with End of record.

2007-08-18 Thread dagurasu15 at hotmail dot com


--- Comment #4 from dagurasu15 at hotmail dot com  2007-08-18 17:58 ---
marking as invalid


-- 

dagurasu15 at hotmail dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||INVALID


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



[Bug libfortran/30162] I/O with named pipes does not work

2007-08-18 Thread dagurasu15 at hotmail dot com


--- Comment #18 from dagurasu15 at hotmail dot com  2007-08-18 19:06 ---
I think this is the same bug.  If not let me know and I'll repost it.
This is a real bummer.  I use this to turn off noise from routines I don't have
control of (and I mean ALOT of noise).  Maybe there is another way to do what I
want though.  Anyway, the following produces a seek error on the write line. 
It worked well in f77.  Now using gcc-4.1.2

   program bug
close(6)
open(6,file='/dev/null',status='old')
close(6)
c  would normally do some noisy stuff here 
cbut not needed to make the bug.
open(6,file='/dev/stdout',status='old')
write (*,*)"Hello"
   end


-- 


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



[Bug libfortran/30162] I/O with named pipes does not work

2007-08-18 Thread dagurasu15 at hotmail dot com


--- Comment #19 from dagurasu15 at hotmail dot com  2007-08-18 19:08 ---
(In reply to comment #18)
> I think this is the same bug.  If not let me know and I'll repost it.
> This is a real bummer.  I use this to turn off noise from routines I don't 
> have
> control of (and I mean ALOT of noise).  Maybe there is another way to do what 
> I
> want though.  Anyway, the following produces a seek error on the write line. 
> It worked well in f77.  Now using gcc-4.1.2
> 
>program bug
> close(6)
> open(6,file='/dev/null',status='old')
> close(6)
> c  would normally do some noisy stuff here 
> cbut not needed to make the bug.
> open(6,file='/dev/stdout',status='old')
> write (*,*)"Hello"
>end
> 

of course the comment should be one line higher.


-- 


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