* [ patch, testsuite, fortran] Replace "call abort" by "stop n"
@ 2018-02-15 22:31 Thomas Koenig
2018-02-15 23:25 ` Thomas Koenig
2018-02-16 8:11 ` Janne Blomqvist
0 siblings, 2 replies; 9+ messages in thread
From: Thomas Koenig @ 2018-02-15 22:31 UTC (permalink / raw)
To: fortran, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 573 bytes --]
Hello world,
the attached patch replaces the non-standard "call abort" by
"STOP n", where n is a number counted up from 1 for each occurrence.
This numbering was suggested by Neil Carlson.
This makes the gfortran testsuite _much_ more standard-conforming.
It also makes it easier to see _which_ of the numerous tests failed,
if anything happens.
I had to adjust the tree dump in a couple of places to check
for stop instead of abort. In the standards tests where the
compiler was supposed to complain about call abort, I left it in :-)
OK for trunk?
Regards
Thomas
[-- Attachment #2: p1.diff.gz --]
[-- Type: application/gzip, Size: 389995 bytes --]
[-- Attachment #3: ChangeLog.gz --]
[-- Type: application/gzip, Size: 10575 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ patch, testsuite, fortran] Replace "call abort" by "stop n"
2018-02-15 22:31 [ patch, testsuite, fortran] Replace "call abort" by "stop n" Thomas Koenig
@ 2018-02-15 23:25 ` Thomas Koenig
2018-02-15 23:37 ` Steve Kargl
2018-02-16 8:11 ` Janne Blomqvist
1 sibling, 1 reply; 9+ messages in thread
From: Thomas Koenig @ 2018-02-15 23:25 UTC (permalink / raw)
To: fortran, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
I wrote:
> OK for trunk?
Following a remark by Steve, here is an additional test case which
checks if abort actually works. I'll add that to the patch
when it is committed.
Regards
Thomas
[-- Attachment #2: abort_shouldfail.f90 --]
[-- Type: text/x-fortran, Size: 99 bytes --]
! { dg-do run }
! { dg-shouldfail "Program aborted." }
program main
call abort
end program main
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ patch, testsuite, fortran] Replace "call abort" by "stop n"
2018-02-15 23:25 ` Thomas Koenig
@ 2018-02-15 23:37 ` Steve Kargl
2018-02-16 8:10 ` Janus Weil
0 siblings, 1 reply; 9+ messages in thread
From: Steve Kargl @ 2018-02-15 23:37 UTC (permalink / raw)
To: Thomas Koenig; +Cc: fortran, gcc-patches
On Fri, Feb 16, 2018 at 12:25:11AM +0100, Thomas Koenig wrote:
> I wrote:
>
> > OK for trunk?
>
> Following a remark by Steve, here is an additional test case which
> checks if abort actually works. I'll add that to the patch
> when it is committed.
>
The patch is ok from my viewpoint. You might want to
give others a chance to chime in.
--
Steve
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ patch, testsuite, fortran] Replace "call abort" by "stop n"
2018-02-15 23:37 ` Steve Kargl
@ 2018-02-16 8:10 ` Janus Weil
0 siblings, 0 replies; 9+ messages in thread
From: Janus Weil @ 2018-02-16 8:10 UTC (permalink / raw)
To: Steve Kargl; +Cc: Thomas Koenig, fortran, gcc-patches
2018-02-16 0:37 GMT+01:00 Steve Kargl <sgk@troutmask.apl.washington.edu>:
> On Fri, Feb 16, 2018 at 12:25:11AM +0100, Thomas Koenig wrote:
>> I wrote:
>>
>> > OK for trunk?
>>
>> Following a remark by Steve, here is an additional test case which
>> checks if abort actually works. I'll add that to the patch
>> when it is committed.
>>
>
> The patch is ok from my viewpoint. You might want to
> give others a chance to chime in.
Ok with me as well. (Personally I'd have gone with a lowercase "stop",
but uppercase is also fine.)
Thanks for taking care of this! The hardest part was probably the ChangeLog ;)
Cheers,
Janus
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ patch, testsuite, fortran] Replace "call abort" by "stop n"
2018-02-15 22:31 [ patch, testsuite, fortran] Replace "call abort" by "stop n" Thomas Koenig
2018-02-15 23:25 ` Thomas Koenig
@ 2018-02-16 8:11 ` Janne Blomqvist
2018-02-17 14:14 ` Thomas Koenig
1 sibling, 1 reply; 9+ messages in thread
From: Janne Blomqvist @ 2018-02-16 8:11 UTC (permalink / raw)
To: Thomas Koenig; +Cc: fortran, gcc-patches
On Fri, Feb 16, 2018 at 12:30 AM, Thomas Koenig <tkoenig@netcologne.de> wrote:
> Hello world,
>
> the attached patch replaces the non-standard "call abort" by
> "STOP n", where n is a number counted up from 1 for each occurrence.
> This numbering was suggested by Neil Carlson.
>
> This makes the gfortran testsuite _much_ more standard-conforming.
> It also makes it easier to see _which_ of the numerous tests failed,
> if anything happens.
>
> I had to adjust the tree dump in a couple of places to check
> for stop instead of abort. In the standards tests where the
> compiler was supposed to complain about call abort, I left it in :-)
Hi,
as a result of this, you should be able to remove the vast majority of
-fall-intrinsics extra options. Please do that as well.
I actually liked the usage of "call abort" in testcases, as a failing
testcase provided a backtrace with line number information and a core
dump. With this change, one now has to check on which line the
testcase failed, set a breakpoint there and run it again in the
debugger. Oh well, I guess that convenience has to be sacrificed on
the altar of standards conformance.
There's also the issue that without special tricks only the lower 8
bits of the exit code are used, and furthermore there are various
conventions. See e.g. https://stackoverflow.com/a/1535733/75652 for
what's typically the meaning on Linux. Anyway, I guess this is mostly
a theoretical quibble as I don't think we have any testcases with that
many error checks.
--
Janne Blomqvist
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ patch, testsuite, fortran] Replace "call abort" by "stop n"
2018-02-16 8:11 ` Janne Blomqvist
@ 2018-02-17 14:14 ` Thomas Koenig
2018-02-17 22:03 ` Janus Weil
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Koenig @ 2018-02-17 14:14 UTC (permalink / raw)
To: Janne Blomqvist; +Cc: fortran, gcc-patches
Am 16.02.2018 um 09:11 schrieb Janne Blomqvist:
> as a result of this, you should be able to remove the vast majority of
> -fall-intrinsics extra options. Please do that as well.
Done, in r257782.
> I actually liked the usage of "call abort" in testcases, as a failing
> testcase provided a backtrace with line number information and a core
> dump. With this change, one now has to check on which line the
> testcase failed, set a breakpoint there and run it again in the
> debugger. Oh well, I guess that convenience has to be sacrificed on
> the altar of standards conformance.
Well, we get the output "STOP 1" for a STOP 1 statement.
Should not be too hard to find in the source.
Regards
Thomas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ patch, testsuite, fortran] Replace "call abort" by "stop n"
2018-02-17 14:14 ` Thomas Koenig
@ 2018-02-17 22:03 ` Janus Weil
2018-02-18 0:38 ` Thomas Koenig
0 siblings, 1 reply; 9+ messages in thread
From: Janus Weil @ 2018-02-17 22:03 UTC (permalink / raw)
To: Thomas Koenig; +Cc: Janne Blomqvist, fortran, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 456 bytes --]
Hi Thomas,
>> as a result of this, you should be able to remove the vast majority of
>> -fall-intrinsics extra options. Please do that as well.
>
>
> Done, in r257782.
Regarding "-fall-intrinsics": Your commit has greatly reduced its
usage, but I still see a few cases that you left in, although the flag
does not really seem to be required.
Is there a reason why did not treat these? Would you mind if I applied
the patch in attachment?
Cheers,
Janus
[-- Attachment #2: fall_intrinsics.diff --]
[-- Type: text/plain, Size: 3273 bytes --]
Index: gcc/testsuite/gfortran.dg/io_real_boz2.f90
===================================================================
--- gcc/testsuite/gfortran.dg/io_real_boz2.f90 (revision 257784)
+++ gcc/testsuite/gfortran.dg/io_real_boz2.f90 (working copy)
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-shouldfail "Real BOZ not allowed" }
-! { dg-options "-fall-intrinsics -std=f2003" }
+! { dg-options "-std=f2003" }
! Test for invalid (F95/F2003) writing of real with octal edit descriptor
! PR fortran/29625
program real_boz
Index: gcc/testsuite/gfortran.dg/pointer_intent_3.f90
===================================================================
--- gcc/testsuite/gfortran.dg/pointer_intent_3.f90 (revision 257784)
+++ gcc/testsuite/gfortran.dg/pointer_intent_3.f90 (working copy)
@@ -1,5 +1,5 @@
! { dg-do compile }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003" }
! { dg-shouldfail "Invalid code" }
!
! Pointer intent test
Index: gcc/testsuite/gfortran.dg/proc_ptr_common_1.f90
===================================================================
--- gcc/testsuite/gfortran.dg/proc_ptr_common_1.f90 (revision 257784)
+++ gcc/testsuite/gfortran.dg/proc_ptr_common_1.f90 (working copy)
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003" }
!
! PR fortran/36592
!
Index: gcc/testsuite/gfortran.dg/protected_3.f90
===================================================================
--- gcc/testsuite/gfortran.dg/protected_3.f90 (revision 257784)
+++ gcc/testsuite/gfortran.dg/protected_3.f90 (working copy)
@@ -1,4 +1,4 @@
-! { dg-options "-std=f95 -fall-intrinsics" }
+! { dg-options "-std=f95" }
! PR fortran/23994
!
! Test PROTECTED attribute. Within the module everything is allowed.
Index: gcc/testsuite/gfortran.dg/protected_4.f90
===================================================================
--- gcc/testsuite/gfortran.dg/protected_4.f90 (revision 257784)
+++ gcc/testsuite/gfortran.dg/protected_4.f90 (working copy)
@@ -1,6 +1,6 @@
! { dg-do compile }
! { dg-shouldfail "Invalid Fortran 2003 code" }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003" }
! PR fortran/23994
!
! Test PROTECTED attribute. Within the module everything is allowed.
Index: gcc/testsuite/gfortran.dg/protected_5.f90
===================================================================
--- gcc/testsuite/gfortran.dg/protected_5.f90 (revision 257784)
+++ gcc/testsuite/gfortran.dg/protected_5.f90 (working copy)
@@ -1,6 +1,6 @@
! { dg-do compile }
! { dg-shouldfail "Invalid Fortran 2003 code" }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003" }
! PR fortran/23994
!
! Test PROTECTED attribute. Within the module everything is allowed.
Index: gcc/testsuite/gfortran.dg/protected_6.f90
===================================================================
--- gcc/testsuite/gfortran.dg/protected_6.f90 (revision 257784)
+++ gcc/testsuite/gfortran.dg/protected_6.f90 (working copy)
@@ -1,6 +1,6 @@
! { dg-do compile }
! { dg-shouldfail "Invalid Fortran 2003 code" }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003" }
! PR fortran/23994
!
! Test PROTECTED attribute. Within the module everything is allowed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ patch, testsuite, fortran] Replace "call abort" by "stop n"
2018-02-17 22:03 ` Janus Weil
@ 2018-02-18 0:38 ` Thomas Koenig
2018-02-18 12:31 ` Janus Weil
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Koenig @ 2018-02-18 0:38 UTC (permalink / raw)
To: Janus Weil; +Cc: Janne Blomqvist, fortran, gcc-patches
Hi Janus,
> Regarding "-fall-intrinsics": Your commit has greatly reduced its
> usage, but I still see a few cases that you left in, although the flag
> does not really seem to be required.
>
> Is there a reason why did not treat these?
I was specifically chaning those cases which contained STOP [1-9]
after my patch; I didn't look at any other use of -fall-intrinsics.
> Would you mind if I applied
> the patch in attachment?
Not at all - if the test cases pass without the option, just go ahead
and commit the patch.
Regards
Thomas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ patch, testsuite, fortran] Replace "call abort" by "stop n"
2018-02-18 0:38 ` Thomas Koenig
@ 2018-02-18 12:31 ` Janus Weil
0 siblings, 0 replies; 9+ messages in thread
From: Janus Weil @ 2018-02-18 12:31 UTC (permalink / raw)
To: Thomas Koenig; +Cc: Janne Blomqvist, fortran, gcc-patches
2018-02-18 1:38 GMT+01:00 Thomas Koenig <tkoenig@netcologne.de>:
> Hi Janus,
>
>> Regarding "-fall-intrinsics": Your commit has greatly reduced its
>> usage, but I still see a few cases that you left in, although the flag
>> does not really seem to be required.
>>
>> Is there a reason why did not treat these?
>
> I was specifically chaning those cases which contained STOP [1-9]
> after my patch; I didn't look at any other use of -fall-intrinsics.
>
>> Would you mind if I applied
>> the patch in attachment?
>
>
> Not at all - if the test cases pass without the option, just go ahead
> and commit the patch.
Alrighty, committed as r257789 (after making sure there are no failures).
Cheers,
Janus
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-02-18 12:31 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-15 22:31 [ patch, testsuite, fortran] Replace "call abort" by "stop n" Thomas Koenig
2018-02-15 23:25 ` Thomas Koenig
2018-02-15 23:37 ` Steve Kargl
2018-02-16 8:10 ` Janus Weil
2018-02-16 8:11 ` Janne Blomqvist
2018-02-17 14:14 ` Thomas Koenig
2018-02-17 22:03 ` Janus Weil
2018-02-18 0:38 ` Thomas Koenig
2018-02-18 12:31 ` Janus Weil
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).