* [patch, gfortran.dg] Make namelist_15.f90 use legal namelist file.
@ 2007-10-06 15:31 Jerry DeLisle
2007-10-06 16:47 ` Paul Thomas
0 siblings, 1 reply; 3+ messages in thread
From: Jerry DeLisle @ 2007-10-06 15:31 UTC (permalink / raw)
To: Fortran List; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 552 bytes --]
Hi,
I plan to commit the attached patch if no objections. The namelist file used
for the test has illegal object specifiers. Only one non-zero rank specifier is
permitted. Also the standard requires that substring specifiers be complete,
meaning one of the three forms:
(j:j)
(:j)
(j:)
This revised test case now passes all compilers we tested, xlf, sun, ifort, g95,
gfortran. (I also removed some leftover debug code and re-enabled the abort)
Thanks to Dominique for pointing this out and assisting with testing.
Regards,
Jerry
[-- Attachment #2: revised.diff --]
[-- Type: text/x-patch, Size: 1493 bytes --]
Index: namelist_15.f90
===================================================================
--- namelist_15.f90 (revision 129029)
+++ namelist_15.f90 (working copy)
@@ -24,15 +24,19 @@ program namelist_15
write (10, '(A)') "&MYNML"
write (10, '(A)') " x = 3, 4, 'dd', 'ee', 'ff', 'gg',"
write (10, '(A)') " 4, 5, 'hh', 'ii', 'jj', 'kk',"
- write (10, '(A)') " x%i = , ,-3, -4"
- write (10, '(A)') " x(2)%m(1)%ch(2) ='q',"
- write (10, '(A)') " x(2)%m(2)%ch(1)(1) ='w',"
- write (10, '(A)') " x%m%ch(:)(2) = 'z','z','z','z','z','z','z','z',"
- write (10, '(A)') "&end"
+ write (10, '(A)') " x(1)%i = , ,"
+ write (10, '(A)') " x(2)%i = -3, -4"
+ write (10, '(A)') " x(2)%m(1)%ch(2)(1:1) ='q',"
+ write (10, '(A)') " x(2)%m(2)%ch(1)(1:1) ='w',"
+ write (10, '(A)') " x(1)%m(1)%ch(1:2)(2:2) = 'z','z',"
+ write (10, '(A)') " x(2)%m(1)%ch(1:2)(2:2) = 'z','z',"
+ write (10, '(A)') " x(1)%m(2)%ch(1:2)(2:2) = 'z','z',"
+ write (10, '(A)') " x(2)%m(2)%ch(1:2)(2:2) = 'z','z',"
+ write (10, '(A)') "/"
rewind (10)
read (10, nml = mynml, iostat = ier)
- if (ier .ne. 0) print *, 'First read.' !call abort ()
+ if (ier .ne. 0) call abort ()
close (10)
open (10, status = "scratch", delim='apostrophe')
@@ -40,7 +44,7 @@ program namelist_15
rewind (10)
read (10, nml = mynml, iostat = ier)
- if (ier .ne. 0) print *, 'Second read.' !call abort ()
+ if (ier .ne. 0) call abort ()
close(10)
if (.not. ((x(1)%i(1) == 3) .and. &
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch, gfortran.dg] Make namelist_15.f90 use legal namelist file.
2007-10-06 15:31 [patch, gfortran.dg] Make namelist_15.f90 use legal namelist file Jerry DeLisle
@ 2007-10-06 16:47 ` Paul Thomas
2007-10-06 17:03 ` Jerry DeLisle
0 siblings, 1 reply; 3+ messages in thread
From: Paul Thomas @ 2007-10-06 16:47 UTC (permalink / raw)
To: Jerry DeLisle; +Cc: Fortran List, gcc-patches
Jerry,
> Hi,
>
> I plan to commit the attached patch if no objections. The namelist
> file used for the test has illegal object specifiers. Only one
> non-zero rank specifier is permitted. Also the standard requires that
> substring specifiers be complete, meaning one of the three forms:
>
> (j:j)
> (:j)
> (j:)
>
> This revised test case now passes all compilers we tested, xlf, sun,
> ifort, g95, gfortran. (I also removed some leftover debug code and
> re-enabled the abort)
I saw the correspondence on comp.lang.fortran. It's a pity, I put a lot
into parsing all that illegal stuff :-)
>
> Thanks to Dominique for pointing this out and assisting with testing.
>
> Regards,
>
> Jerry
It is, of course, OK
Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch, gfortran.dg] Make namelist_15.f90 use legal namelist file.
2007-10-06 16:47 ` Paul Thomas
@ 2007-10-06 17:03 ` Jerry DeLisle
0 siblings, 0 replies; 3+ messages in thread
From: Jerry DeLisle @ 2007-10-06 17:03 UTC (permalink / raw)
To: Paul Thomas; +Cc: Fortran List, gcc-patches
Paul Thomas wrote:
> Jerry,
>> Hi,
>>
>> I plan to commit the attached patch if no objections. The namelist
>> file used for the test has illegal object specifiers. Only one
>> non-zero rank specifier is permitted. Also the standard requires that
>> substring specifiers be complete, meaning one of the three forms:
>>
>> (j:j)
>> (:j)
>> (j:)
>>
>> This revised test case now passes all compilers we tested, xlf, sun,
>> ifort, g95, gfortran. (I also removed some leftover debug code and
>> re-enabled the abort)
> I saw the correspondence on comp.lang.fortran. It's a pity, I put a lot
> into parsing all that illegal stuff :-)
>>
>> Thanks to Dominique for pointing this out and assisting with testing.
>>
>> Regards,
>>
>> Jerry
> It is, of course, OK
>
> Paul
>
>
>
Thanks Paul, committed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-06 17:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-06 15:31 [patch, gfortran.dg] Make namelist_15.f90 use legal namelist file Jerry DeLisle
2007-10-06 16:47 ` Paul Thomas
2007-10-06 17:03 ` Jerry DeLisle
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).