This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66331] New: gfortran.dg/continuation_13.f90 execution failure
- From: "jpsinthemix at verizon dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 29 May 2015 00:04:17 +0000
- Subject: [Bug fortran/66331] New: gfortran.dg/continuation_13.f90 execution failure
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66331
Bug ID: 66331
Summary: gfortran.dg/continuation_13.f90 execution failure
Product: gcc
Version: 5.1.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jpsinthemix at verizon dot net
Target Milestone: ---
Hi,
I'm getting the following gfortran testsuite errors for gcc-5.1.0 on an
x86_64-pc-linux-gnu system:
=== gfortran tests ===
Schedule of variations:
unix
Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/config/default.exp
as tool-and-target-specific interface file.
Running
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/gfortran.dg/coarray/caf.exp
...
Running
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/gfortran.dg/debug/debug.exp
...
Running
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/gfortran.dg/dg.exp
...
FAIL: gfortran.dg/continuation_13.f90 -O0 execution test
FAIL: gfortran.dg/continuation_13.f90 -O1 execution test
FAIL: gfortran.dg/continuation_13.f90 -O2 execution test
FAIL: gfortran.dg/continuation_13.f90 -O3 -fomit-frame-pointer execution
test
FAIL: gfortran.dg/continuation_13.f90 -O3 -fomit-frame-pointer -funroll-loops
execution test
FAIL: gfortran.dg/continuation_13.f90 -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions execution test
FAIL: gfortran.dg/continuation_13.f90 -O3 -g execution test
FAIL: gfortran.dg/continuation_13.f90 -Os execution test
Running
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/gfortran.dg/goacc/goacc.exp
...
Running
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/gfortran.dg/gomp/gomp.exp
...
Running
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/gfortran.dg/graphite/graphite.exp
...
Running
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/gfortran.dg/guality/guality.exp
...
Running
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/gfortran.dg/ieee/ieee.exp
...
Running
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/gfortran.dg/lto/lto.exp
...
Running
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/gfortran.dg/vect/vect.exp
...
Running
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp
...
Running
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp
...
The failure occurs in
gcc-5.1.0/gcc/testsuite/gfortran.dg/continuation_13.f90:37
1 ! { dg-do run }
2 ! { dg-options "-std=gnu" }
3 ! PR64506
4 character(25) :: astring
5
6 100 format('This format is OK.'&
7 )
8 200 format('This format now works.'&!comment
9 )
10 300 format('This format now works.'& !comment
11 )
12 400 format('This format is OK.' &!comment
13 )
14 500 format('This format is OK.' & !comment
15 )
16 600 format('This format now works.'''&!comment
17 )
18 700 format('This format now works.'''& !comment
19 )
20 800 format('This is actually ok.'& !comment
21 ' end' )
22 write(astring,100)
23 if (astring.ne."This format is OK.") call abort
24 write(astring,200)
25 if (astring.ne."This format now works.") call abort
26 write(astring,300)
27 if (astring.ne."This format now works.") call abort
28 write(astring,400)
29 if (astring.ne."This format is OK.") call abort
30 write(astring,500)
31 if (astring.ne."This format is OK.") call abort
32 write(astring,600)
33 if (astring.ne."This format now works.'") call abort
34 write(astring,700)
35 if (astring.ne."This format now works.'") call abort
36 write(astring,800)
37 if (astring.ne."This is actually ok. end") call abort <------ fails
38
39 end
I modified continuation_13.f90 as follows:
1 ! { dg-do run }
2 ! { dg-options "-std=gnu" }
3 ! PR64506
4 character(25) :: astring
5
6 100 format('This format is OK.'&
7 )
8 200 format('This format now works.'&!comment
9 )
10 300 format('This format now works.'& !comment
11 )
12 400 format('This format is OK.' &!comment
13 )
14 500 format('This format is OK.' & !comment
15 )
16 600 format('This format now works.'''&!comment
17 )
18 700 format('This format now works.'''& !comment
19 )
20 800 format('This is actually ok.'& !comment
21 ' end' )
22 810 format('This is actually ok.'' end' & !comment
23 )
24 820 format('This is actually ok.' & !comment
25 ' end' )
26 write(astring,100)
27 if (astring.ne."This format is OK.") write(*,*) "ERR 100: |",
astring, "|This format is OK.|"
28 write(astring,200)
29 if (astring.ne."This format now works.") write(*,*) "ERR 200: |",
astring, "|This format now works.|"
30 write(astring,300)
31 if (astring.ne."This format now works.") write(*,*) "ERR 300: |",
astring, "|This format now works.|"
32 write(astring,400)
33 if (astring.ne."This format is OK.") write(*,*) "ERR 400: |",
astring, "|This format is OK.|"
34 write(astring,500)
35 if (astring.ne."This format is OK.") write(*,*) "ERR 500: |",
astring, "|This format is OK.|"
36 write(astring,600)
37 if (astring.ne."This format now works.'") write(*,*) "ERR 600: |",
astring, "|This format now works.'|"
38 write(astring,700)
39 if (astring.ne."This format now works.'") write(*,*) "ERR 700: |",
astring, "|This format now works.'|"
40 write(astring,800)
41 if (astring.ne."This is actually ok. end") write(*,*) "ERR 800: |",
astring, "|This is actually ok. end|"
42 write(astring,810)
43 if (astring.ne."This is actually ok.' end") write(*,*) "ERR 810: |",
astring, "|This is actually ok.' end|"
44 write(astring,820)
45 if (astring.ne."This is actually ok. end") write(*,*) "ERR 820: |",
astring, "|This is actually ok. end|"
46
47 end
Running this, I get:
ERR 800: |This is actually ok.' end|This is actually ok. end|
ERR 810: |This is actually ok.' end|This is actually ok. end|
So, it looks like format 800 is being interpreted like format 810; the
continuation operator & results in ok.' + ' end' being parsed as ok.'' end',
and then the '' goes to a single quote. Adding a space before the & (format
820) presumably results in ok.' ' end', and so the two character constants are
concatenated as expected.
I'm not at all up on fortran so I'm not sure whether this is a bug in the
compiler or simply an incorrect expected test result.
thanks much for your time and work,
John Stanley