public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed]
@ 2021-10-22 22:07 Tobias Burnus
  0 siblings, 0 replies; 3+ messages in thread
From: Tobias Burnus @ 2021-10-22 22:07 UTC (permalink / raw)
  To: gcc-patches, fortran

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

Committed as r12-4633-g030875c197e339542ddfcbad90cfc01263151bec

To reduce the XFAIL clutter in the *.sum files, this patch removes some
pointless XFAIL in favour of pruning the output which should be ignored
and using explicit checks for the currently output warnings/errors.

Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

[-- Attachment #2: committed.diff --]
[-- Type: text/x-patch, Size: 23632 bytes --]

commit 030875c197e339542ddfcbad90cfc01263151bec
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Sat Oct 23 00:04:43 2021 +0200

    Fortran: Change XFAIL to PASS
    
    Replace dg-excess-errors by dg-error/warning and dg-prune-output for
    more fine-grained output handling and to avoid XPASS.
    
    gcc/testsuite/ChangeLog:
    
            * gfortran.dg/associate_3.f03: Replace dg-excess-errors by
            other dg-* to change XFAIL to PASS.
            * gfortran.dg/binding_label_tests_4.f03: Likewise.
            * gfortran.dg/block_4.f08: Likewise.
            * gfortran.dg/charlen_04.f90: Likewise.
            * gfortran.dg/charlen_05.f90: Likewise.
            * gfortran.dg/charlen_06.f90: Likewise.
            * gfortran.dg/charlen_13.f90: Likewise.
            * gfortran.dg/coarray_9.f90: Likewise.
            * gfortran.dg/coarray_collectives_3.f90: Likewise.
            * gfortran.dg/data_invalid.f90: Likewise.
            * gfortran.dg/do_4.f: Likewise.
            * gfortran.dg/dollar_sym_1.f90: Likewise.
            * gfortran.dg/dollar_sym_3.f: Likewise.
            * gfortran.dg/fmt_tab_1.f90: Likewise.
            * gfortran.dg/fmt_tab_2.f90: Likewise.
            * gfortran.dg/forall_16.f90: Likewise.
            * gfortran.dg/g77/970125-0.f: Likewise.
            * gfortran.dg/gomp/unexpected-end.f90: Likewise.
            * gfortran.dg/interface_operator_1.f90: Likewise.
            * gfortran.dg/interface_operator_2.f90: Likewise.
            * gfortran.dg/line_length_4.f90: Likewise.
            * gfortran.dg/line_length_5.f90: Likewise.
            * gfortran.dg/line_length_6.f90: Likewise.
            * gfortran.dg/line_length_8.f90: Likewise.
            * gfortran.dg/line_length_9.f90: Likewise.
            * gfortran.dg/pr65045.f90: Likewise.
            * gfortran.dg/pr69497.f90: Likewise.
            * gfortran.dg/submodule_21.f08: Likewise.
            * gfortran.dg/tab_continuation.f: Likewise.
            * gfortran.dg/typebound_proc_2.f90: Likewise.
            * gfortran.dg/warnings_are_errors_1.f90: Likewise.

diff --git a/gcc/testsuite/gfortran.dg/associate_3.f03 b/gcc/testsuite/gfortran.dg/associate_3.f03
index da7bec951d1..dfd5a99500e 100644
--- a/gcc/testsuite/gfortran.dg/associate_3.f03
+++ b/gcc/testsuite/gfortran.dg/associate_3.f03
@@ -34,4 +34,4 @@ PROGRAM main
     INTEGER :: b ! { dg-error "Unexpected data declaration statement" }
   END ASSOCIATE
 END PROGRAM main ! { dg-error "Expecting END ASSOCIATE" }
-! { dg-excess-errors "Unexpected end of file" }
+! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_4.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_4.f03
index f8c0f046063..af9a588cfec 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_4.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_4.f03
@@ -20,4 +20,4 @@ module C
 use A
 use B ! { dg-error "Cannot open module file" }
 end module C
-! { dg-excess-errors "compilation terminated" }
+! { dg-prune-output "compilation terminated" }
diff --git a/gcc/testsuite/gfortran.dg/block_4.f08 b/gcc/testsuite/gfortran.dg/block_4.f08
index 4c63194c85d..3ff52b0a098 100644
--- a/gcc/testsuite/gfortran.dg/block_4.f08
+++ b/gcc/testsuite/gfortran.dg/block_4.f08
@@ -15,4 +15,4 @@ PROGRAM main
   myname2: BLOCK
   END BLOCK ! { dg-error "Expected block name of 'myname2'" }
 END PROGRAM main ! { dg-error "Expecting END BLOCK" }
-! { dg-excess-errors "Unexpected end of file" }
+! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }
diff --git a/gcc/testsuite/gfortran.dg/charlen_04.f90 b/gcc/testsuite/gfortran.dg/charlen_04.f90
index f93465f2ae6..97aa0ec583c 100644
--- a/gcc/testsuite/gfortran.dg/charlen_04.f90
+++ b/gcc/testsuite/gfortran.dg/charlen_04.f90
@@ -3,6 +3,5 @@
 program p
    type t
       character(*), allocatable :: x(*)  ! { dg-error "must have a deferred shape" }
-   end type
+   end type                              ! { dg-error "needs to be a constant specification" "" { target "*-*-*" } .-1 } 
 end
-! { dg-excess-errors "needs to be a constant specification" } 
diff --git a/gcc/testsuite/gfortran.dg/charlen_05.f90 b/gcc/testsuite/gfortran.dg/charlen_05.f90
index 0eb0015bf38..e58f9263330 100644
--- a/gcc/testsuite/gfortran.dg/charlen_05.f90
+++ b/gcc/testsuite/gfortran.dg/charlen_05.f90
@@ -3,6 +3,5 @@
 program p
    type t
       character(*) :: x y  ! { dg-error "error in data declaration" }
-   end type
+   end type                ! { dg-error "needs to be a constant specification" "" { target "*-*-*" } .-1 } 
 end
-! { dg-excess-errors "needs to be a constant specification" } 
diff --git a/gcc/testsuite/gfortran.dg/charlen_06.f90 b/gcc/testsuite/gfortran.dg/charlen_06.f90
index e20d6047f68..836c1c69d9e 100644
--- a/gcc/testsuite/gfortran.dg/charlen_06.f90
+++ b/gcc/testsuite/gfortran.dg/charlen_06.f90
@@ -3,6 +3,5 @@
 program p
    type t
       character(*) :: x+1  ! { dg-error "error in data declaration" }
-   end type
+   end type                ! { dg-error "needs to be a constant specification" "" { target "*-*-*" } .-1 } 
 end
-! { dg-excess-errors "needs to be a constant specification" } 
diff --git a/gcc/testsuite/gfortran.dg/charlen_13.f90 b/gcc/testsuite/gfortran.dg/charlen_13.f90
index d89b71c9dcb..8dc192bd0b1 100644
--- a/gcc/testsuite/gfortran.dg/charlen_13.f90
+++ b/gcc/testsuite/gfortran.dg/charlen_13.f90
@@ -4,7 +4,7 @@ program p
    type t
       character(2), allocatable :: a(*) ! { dg-error "must have a deferred shape" }
       character(*), allocatable :: b(2) ! { dg-error "must have a deferred shape" }
+                                        ! { dg-error "needs to be a constant specification" "" { target "*-*-*" } .-1 } 
       character(*), allocatable :: c(*) ! { dg-error "must have a deferred shape" }
-   end type
+   end type                             ! { dg-error "needs to be a constant specification" "" { target "*-*-*" } .-1 } 
 end
-! { dg-excess-errors "needs to be a constant specification" } 
diff --git a/gcc/testsuite/gfortran.dg/coarray_9.f90 b/gcc/testsuite/gfortran.dg/coarray_9.f90
index 0a4dbeccc50..b613428bcc7 100644
--- a/gcc/testsuite/gfortran.dg/coarray_9.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_9.f90
@@ -16,4 +16,4 @@ critical ! "Coarrays disabled"  (but error above is fatal)
 end critical ! "Expecting END PROGRAM statement"  (but error above is fatal)
 
 end
-! { dg-excess-errors "compilation terminated" }
+! { dg-prune-output "compilation terminated" }
diff --git a/gcc/testsuite/gfortran.dg/coarray_collectives_3.f90 b/gcc/testsuite/gfortran.dg/coarray_collectives_3.f90
index 2a3ddf44cfe..04d540f373d 100644
--- a/gcc/testsuite/gfortran.dg/coarray_collectives_3.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_collectives_3.f90
@@ -8,4 +8,4 @@ program test
   integer :: val
   call co_max(val) ! { dg-error "Coarrays disabled at .1., use '-fcoarray=' to enable" }
 end program test
-! { dg-excess-errors "compilation terminated" }
+! { dg-prune-output "compilation terminated" }
diff --git a/gcc/testsuite/gfortran.dg/data_invalid.f90 b/gcc/testsuite/gfortran.dg/data_invalid.f90
index 960a8f3d3ec..6d0358759ad 100644
--- a/gcc/testsuite/gfortran.dg/data_invalid.f90
+++ b/gcc/testsuite/gfortran.dg/data_invalid.f90
@@ -40,7 +40,7 @@ SUBROUTINE data_init_array_invalid()
   data       e(2) / 2 /                          ! { dg-error "re-initialization" }
 
   integer :: f(3) = 0                            ! { dg-error "already is initialized" }
-  data       f(2) / 1 /
+  data       f(2) / 1 /                          ! { dg-error "already is initialized" }
 
   ! full array initializer, re-initialize subsection
   integer :: g(3)
@@ -48,7 +48,7 @@ SUBROUTINE data_init_array_invalid()
   data       g(1:2) / 2*2 /                      ! { dg-error "re-initialization" }
 
   integer :: h(3) = 1                            ! { dg-error "already is initialized" }
-  data       h(2:3) / 2*2 /
+  data       h(2:3) / 2*2 /                      ! { dg-error "already is initialized" }
 
   ! full array initializer, re-initialize full array
   integer :: i(3)
@@ -56,7 +56,7 @@ SUBROUTINE data_init_array_invalid()
   data       i   / 2,2,2 /                       ! { dg-error "re-initialization" }
 
   integer :: j(3) = 1                            ! { dg-error "already is initialized" }
-  data       j   / 3*2 /
+  data       j   / 3*2 /                         ! { dg-error "already is initialized" }
 END SUBROUTINE
 
 SUBROUTINE data_init_matrix_invalid()
@@ -85,7 +85,7 @@ SUBROUTINE data_init_matrix_invalid()
   data       e(2,3) / 2 /                        ! { dg-error "re-initialization" }
 
   integer :: f(3,3) = 1                          ! { dg-error "already is initialized" }
-  data       f(3,2) / 2 /
+  data       f(3,2) / 2 /                        ! { dg-error "already is initialized" }
 
   ! full array initializer, re-initialize subsection
   integer :: g(3,3)
@@ -93,7 +93,7 @@ SUBROUTINE data_init_matrix_invalid()
   data       g(2:3,2:3) / 2, 2*3, 4 /            ! { dg-error "re-initialization" }
 
   integer :: h(3,3) = 1                          ! { dg-error "already is initialized" }
-  data       h(2:3,2:3) / 2, 2*3, 4 /
+  data       h(2:3,2:3) / 2, 2*3, 4 /            ! { dg-error "already is initialized" }
 
   ! full array initializer, re-initialize full array
   integer :: i(3,3)
@@ -101,7 +101,7 @@ SUBROUTINE data_init_matrix_invalid()
   data       i   / 9 * 1 /                       ! { dg-error "re-initialization" }
 
   integer :: j(3,3) = 0                          ! { dg-error "already is initialized" }
-  data       j   / 9 * 1 /
+  data       j   / 9 * 1 /                       ! { dg-error "already is initialized" }
 END SUBROUTINE
 
 SUBROUTINE data_init_misc_invalid()
@@ -112,11 +112,9 @@ SUBROUTINE data_init_misc_invalid()
   ! index out-of-bounds, direct access
   integer :: b(3)
   data       b(-2) / 1 /                         ! { dg-error "below array lower bound" }
-
+                                                 ! { dg-warning "is out of bounds" "" { target *-*-* } .-1 }
   ! index out-of-bounds, implied do-loop (PR32315)
   integer :: i
   character(len=20), dimension(4) :: string
   data (string(i), i = 1, 5) / 'A', 'B', 'C', 'D', 'E' /   ! { dg-error "above array upper bound" }
 END SUBROUTINE
-
-! { dg-excess-errors "" }
diff --git a/gcc/testsuite/gfortran.dg/do_4.f b/gcc/testsuite/gfortran.dg/do_4.f
index 6d688a0a323..e391b685fc2 100644
--- a/gcc/testsuite/gfortran.dg/do_4.f
+++ b/gcc/testsuite/gfortran.dg/do_4.f
@@ -4,6 +4,7 @@
        if(i.eq.5)then
           goto 10
  10    endif           ! { dg-error "is within another block" }
-       end
-! { dg-excess-errors "" }
+       end             ! { dg-error "END DO statement expected" }
+                       ! { dg-warning "Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE" "" { target "*-*-*" } 6 }
+! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }
 
diff --git a/gcc/testsuite/gfortran.dg/dollar_sym_1.f90 b/gcc/testsuite/gfortran.dg/dollar_sym_1.f90
index cb53fd320f2..5cee77599f4 100644
--- a/gcc/testsuite/gfortran.dg/dollar_sym_1.f90
+++ b/gcc/testsuite/gfortran.dg/dollar_sym_1.f90
@@ -7,4 +7,4 @@
       PARAMETER (PLT$B_OPC=0) !  Unreachable as the error above is now fatal
       common /abc$def/ PLT$C_HOUSTPIX, PLT$C_COMMAND !  Unreachable as the error above is now fatal
       end
-! { dg-excess-errors "compilation terminated" }
+! { dg-prune-output "compilation terminated" }
diff --git a/gcc/testsuite/gfortran.dg/dollar_sym_3.f b/gcc/testsuite/gfortran.dg/dollar_sym_3.f
index 7b9b3446106..52ce041c09e 100644
--- a/gcc/testsuite/gfortran.dg/dollar_sym_3.f
+++ b/gcc/testsuite/gfortran.dg/dollar_sym_3.f
@@ -8,4 +8,4 @@ c Segmentation fault in gfc_restore_last_undo_checkpoint
       COMMON RADE3155V62$JUTMU9L9E(3,3,3), LADE314JUTMP9         ! { dg-error "Invalid character '\\$' at .1.. Use '-fdollar-ok' to allow it as an extension" }
      +LHEDDJNTMP9L(3,3,3)                                                       
       end
-! { dg-excess-errors "compilation terminated" }
+! { dg-prune-output "compilation terminated" }
diff --git a/gcc/testsuite/gfortran.dg/fmt_tab_1.f90 b/gcc/testsuite/gfortran.dg/fmt_tab_1.f90
index a763714881b..0b36aee2a2f 100644
--- a/gcc/testsuite/gfortran.dg/fmt_tab_1.f90
+++ b/gcc/testsuite/gfortran.dg/fmt_tab_1.f90
@@ -6,7 +6,6 @@
         write (*, 10)
         ! There is a tab character before 'bug!'.  This is accepted without
         ! the -Wno-tabs option or a -std= option.
- 10     format ('Hello ',	'bug!') ! { dg-warning "tab character in format" }
-
+ 10     format ('Hello ',	'bug!') ! { dg-warning "tab character in format at " }
+                                        ! { dg-warning "tab character at " "" { target "*-*-*" } .-1 }
       end
-! { dg-excess-errors "tab character in format" }
diff --git a/gcc/testsuite/gfortran.dg/fmt_tab_2.f90 b/gcc/testsuite/gfortran.dg/fmt_tab_2.f90
index bfff7ce924f..3f2d6fcc26d 100644
--- a/gcc/testsuite/gfortran.dg/fmt_tab_2.f90
+++ b/gcc/testsuite/gfortran.dg/fmt_tab_2.f90
@@ -5,5 +5,4 @@
       program TestFormat
         write (*, 10)
  10     format ('Hello ',	'bug!') ! { dg-warning "tab character in format" }
-      end
-! { dg-excess-errors "tab character in FORMAT" }
+      end                               ! { dg-warning "tab character at " "" { target "*-*-*" } .-1 }
diff --git a/gcc/testsuite/gfortran.dg/forall_16.f90 b/gcc/testsuite/gfortran.dg/forall_16.f90
index 017aa5afdac..e341c377d74 100644
--- a/gcc/testsuite/gfortran.dg/forall_16.f90
+++ b/gcc/testsuite/gfortran.dg/forall_16.f90
@@ -4,6 +4,4 @@
   implicit none
   integer i,dest(10)
   forall (i=2:ix)  dest(i)=i ! { dg-error "has no IMPLICIT type" }
-end
-
-! { dg-excess-errors "Can't convert UNKNOWN to INTEGER" }
+end                          ! { dg-error "Cannot convert UNKNOWN to INTEGER" "" { target "*-*-*" } .-1 }
diff --git a/gcc/testsuite/gfortran.dg/g77/970125-0.f b/gcc/testsuite/gfortran.dg/g77/970125-0.f
index 656c4750abe..0c12e26fbd5 100644
--- a/gcc/testsuite/gfortran.dg/g77/970125-0.f
+++ b/gcc/testsuite/gfortran.dg/g77/970125-0.f
@@ -1,7 +1,6 @@
 c { dg-do compile }
 c
-c Following line added on transfer to gfortran testsuite
-c { dg-excess-errors "" }
+c { dg-additional-options "-w" }
 c
 C JCB comments:
 C g77 doesn't accept the added line "integer(kind=7) ..." --
@@ -35,10 +34,10 @@ c     Frontend bug fixed by JCB 1998-06-01 com.c &c changes.
         print *, max4
         print *, i4, %loc(i4)
         print *, i8, %loc(i8)
-        call foo(i4, %loc(i4), i8, %loc(i8))
+        call foo(i4, %loc(i4), i8, %loc(i8))  ! { dg-error "Type mismatch in argument 'i8a' at .1.; passed INTEGER.8. to INTEGER.4." }
         end
         subroutine foo(i4, i4a, i8, i8a)
-        integer(kind=7) i4a, i8a
+        integer(kind=7) i4a, i8a  ! { dg-error "Kind 7 not supported for type INTEGER" }
         integer(kind=8) i8
         print *, i4, i4a
         print *, i8, i8a
diff --git a/gcc/testsuite/gfortran.dg/gomp/unexpected-end.f90 b/gcc/testsuite/gfortran.dg/gomp/unexpected-end.f90
index d2e8daa3fde..96f10b594cf 100644
--- a/gcc/testsuite/gfortran.dg/gomp/unexpected-end.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/unexpected-end.f90
@@ -120,4 +120,4 @@ end do
 
 end  ! { dg-error "Unexpected END statement" }
 
-! { dg-excess-errors "Unexpected end of file" }
+! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }
diff --git a/gcc/testsuite/gfortran.dg/interface_operator_1.f90 b/gcc/testsuite/gfortran.dg/interface_operator_1.f90
index 97d260a2b98..66847511a75 100644
--- a/gcc/testsuite/gfortran.dg/interface_operator_1.f90
+++ b/gcc/testsuite/gfortran.dg/interface_operator_1.f90
@@ -7,4 +7,4 @@ program p
    interface operator ( .gt. )
    end interface operator        ! { dg-error "END INTERFACE OPERATOR" }
 end program p                    ! { dg-error "END INTERFACE" }
-! { dg-excess-errors "Unexpected end of file" }
+! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }
diff --git a/gcc/testsuite/gfortran.dg/interface_operator_2.f90 b/gcc/testsuite/gfortran.dg/interface_operator_2.f90
index a73959650e2..11b9ff55736 100644
--- a/gcc/testsuite/gfortran.dg/interface_operator_2.f90
+++ b/gcc/testsuite/gfortran.dg/interface_operator_2.f90
@@ -7,4 +7,4 @@ program p
    interface operator ( .gt. )
    end interface operator (.lt.) ! { dg-error "END INTERFACE OPERATOR" }
 end program p                    ! { dg-error "END INTERFACE" }
-! { dg-excess-errors "Unexpected end of file" }
+! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }
diff --git a/gcc/testsuite/gfortran.dg/line_length_4.f90 b/gcc/testsuite/gfortran.dg/line_length_4.f90
index 6e3c76e6f88..80040408927 100644
--- a/gcc/testsuite/gfortran.dg/line_length_4.f90
+++ b/gcc/testsuite/gfortran.dg/line_length_4.f90
@@ -16,4 +16,4 @@
    end subroutine foo
   end
 ! { dg-error "Line truncated" " " { target *-*-* } 8 }
-! { dg-excess-errors "some warnings being treated as errors" }
+! { dg-prune-output "some warnings being treated as errors" }
diff --git a/gcc/testsuite/gfortran.dg/line_length_5.f90 b/gcc/testsuite/gfortran.dg/line_length_5.f90
index d7aca12e004..81832451ea2 100644
--- a/gcc/testsuite/gfortran.dg/line_length_5.f90
+++ b/gcc/testsuite/gfortran.dg/line_length_5.f90
@@ -4,4 +4,4 @@ print *, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 end 
 ! { dg-error "Line truncated" " " { target *-*-* } 3 }
 ! { dg-error "Unterminated character constant" " " { target *-*-* } 3 }
-! { dg-excess-errors "some warnings being treated as errors" }
+! { dg-prune-output "some warnings being treated as errors" }
diff --git a/gcc/testsuite/gfortran.dg/line_length_6.f90 b/gcc/testsuite/gfortran.dg/line_length_6.f90
index 92f3401e90f..8cdb0209981 100644
--- a/gcc/testsuite/gfortran.dg/line_length_6.f90
+++ b/gcc/testsuite/gfortran.dg/line_length_6.f90
@@ -5,4 +5,4 @@
 !
       print *, 1                                                                                                                                          + 2 ! { dg-error "Line truncated at .1." }
       end
-! { dg-excess-errors "some warnings being treated as errors" }
+! { dg-prune-output "some warnings being treated as errors" }
diff --git a/gcc/testsuite/gfortran.dg/line_length_8.f90 b/gcc/testsuite/gfortran.dg/line_length_8.f90
index 3f0efaf4c0a..afd6cc2df46 100644
--- a/gcc/testsuite/gfortran.dg/line_length_8.f90
+++ b/gcc/testsuite/gfortran.dg/line_length_8.f90
@@ -6,4 +6,4 @@
 !
       print *, 1                                                                                                                                          + 2 ! { dg-error "Line truncated at .1." }
       end
-! { dg-excess-errors "some warnings being treated as errors" }
+! { dg-prune-output "some warnings being treated as errors" }
diff --git a/gcc/testsuite/gfortran.dg/line_length_9.f90 b/gcc/testsuite/gfortran.dg/line_length_9.f90
index f338972272c..6c156afc144 100644
--- a/gcc/testsuite/gfortran.dg/line_length_9.f90
+++ b/gcc/testsuite/gfortran.dg/line_length_9.f90
@@ -6,4 +6,4 @@
 !
       print *, 1                                                                                                                                          + 2 ! { dg-error "Line truncated at .1." }
       end
-! { dg-excess-errors "some warnings being treated as errors" }
+! { dg-prune-output "some warnings being treated as errors" }
diff --git a/gcc/testsuite/gfortran.dg/pr65045.f90 b/gcc/testsuite/gfortran.dg/pr65045.f90
index 5b838d5fb03..c49652993d7 100644
--- a/gcc/testsuite/gfortran.dg/pr65045.f90
+++ b/gcc/testsuite/gfortran.dg/pr65045.f90
@@ -12,4 +12,4 @@ i:block
 end block i      ! { dg-error "Expecting END PROGRAM statement" }
 print*,i         ! { dg-error "not appropriate for an expression" }
 end
-! { dg-excess-errors "Unexpected end of file" }
+! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }
diff --git a/gcc/testsuite/gfortran.dg/pr69497.f90 b/gcc/testsuite/gfortran.dg/pr69497.f90
index 1698ebbf4ec..291d906cb45 100644
--- a/gcc/testsuite/gfortran.dg/pr69497.f90
+++ b/gcc/testsuite/gfortran.dg/pr69497.f90
@@ -5,4 +5,4 @@ program p
    do
    end block ! { dg-error "Expecting END DO statement" }
 end ! { dg-error "END DO statement expected" }
-! { dg-excess-errors "Unexpected end of file" }
+! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }
diff --git a/gcc/testsuite/gfortran.dg/submodule_21.f08 b/gcc/testsuite/gfortran.dg/submodule_21.f08
index c96acb2e856..bb626006fe9 100644
--- a/gcc/testsuite/gfortran.dg/submodule_21.f08
+++ b/gcc/testsuite/gfortran.dg/submodule_21.f08
@@ -16,4 +16,5 @@ PROGRAM MyProg
   USE MainModule
   WRITE(*,*) a
 END PROGRAM MyProg
-! { dg-excess-errors "does not contain a MODULE PROCEDURE" }
+! { dg-error "does not contain a MODULE PROCEDURE" "" { target "*-*-*" } 0 }
+! { dg-prune-output "compilation terminated" }
diff --git a/gcc/testsuite/gfortran.dg/tab_continuation.f b/gcc/testsuite/gfortran.dg/tab_continuation.f
index 85d230774b1..719b03f2586 100644
--- a/gcc/testsuite/gfortran.dg/tab_continuation.f
+++ b/gcc/testsuite/gfortran.dg/tab_continuation.f
@@ -17,4 +17,4 @@
 ! { dg-error "Nonconforming tab character in column 1 of line 13" "Nonconforming tab" { target *-*-* } 0 }
 ! { dg-error "Nonconforming tab character in column 1 of line 14" "Nonconforming tab" { target *-*-* } 0 }
 ! { dg-error "Nonconforming tab character in column 1 of line 15" "Nonconforming tab" { target *-*-* } 0 }
-! { dg-excess-errors "some warnings being treated as errors" }
+! { dg-prune-output "some warnings being treated as errors" }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_2.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_2.f90
index a34d935eb06..14f01effd0e 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_2.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_2.f90
@@ -9,24 +9,23 @@ MODULE testmod
 
   TYPE t
     INTEGER :: x
-  CONTAINS ! { dg-error "Fortran 2003" }
-    PROCEDURE proc1 ! { dg-error "Fortran 2003" }
-    PROCEDURE :: proc2 => p2 ! { dg-error "Fortran 2003" }
-  END TYPE t
+  CONTAINS ! { dg-error "Fortran 2003: CONTAINS block in derived type definition" }
+    PROCEDURE proc1 ! { dg-error "Fortran 2003: PROCEDURE statement" }
+    PROCEDURE :: proc2 => p2 ! { dg-error "Fortran 2003: PROCEDURE statement" }
+  END TYPE t                 ! { dg-error "Fortran 2008: Derived type definition at .1. with empty CONTAINS section" }
 
 CONTAINS
   
-  SUBROUTINE proc1 (me)
+  SUBROUTINE proc1 (me) ! { dg-error "no IMPLICIT type" }
     IMPLICIT NONE
-    TYPE(t1) :: me
+    TYPE(t1) :: me     ! { dg-error "being used before it is defined" }
   END SUBROUTINE proc1
 
-  REAL FUNCTION proc2 (me, x)
+  REAL FUNCTION proc2 (me, x) ! { dg-error "no IMPLICIT type" }
     IMPLICIT NONE
-    TYPE(t1) :: me
+    TYPE(t1) :: me     ! { dg-error "being used before it is defined" }
     REAL :: x
     proc2 = x / 2
   END FUNCTION proc2
 
 END MODULE testmod
-! { dg-excess-errors "no IMPLICIT type" }
diff --git a/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90 b/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90
index 150f2346a4f..1f9d38d794f 100644
--- a/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90
+++ b/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90
@@ -22,4 +22,4 @@
 
        end
 ! { dg-final { output-exists-not } }
-! { dg-excess-errors "warnings being treated as errors" }
+! { dg-prune-output "warnings being treated as errors" }

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

* [committed]
@ 2019-10-12 20:49 John David Anglin
  0 siblings, 0 replies; 3+ messages in thread
From: John David Anglin @ 2019-10-12 20:49 UTC (permalink / raw)
  To: GCC Patches

This is the first patch in a series of changes intended to fix glibc/23296.  This bug
is a data race in the setting of function descriptors during lazy binding.  If a descriptor
is updated between the loading of the function target address and the PIC global pointer
in another thread, _dl_runtime_resolve() is entered with the new global pointer instead
of the expected reloc offset. _dl_runtime_resolve() could handle this situation if we modify
the indirect call sequence to preserve the function pointer (descriptor address) in register
%r22.

We also change the code to consistently load the function address before the global pointer.
There might be still an issue on PA 2.0 hardware due to the out-of-order execution of accesses.
Currently, the linker doesn't double word align descriptors.  As a result, descriptors can span
cache lines and page boundaries. Thus, it might be possible that a function is entered with an
incorrect global pointer.

This patch slightly improves $$dyncall on Linux.

Tested on hppa-unknown-linux-gnu.  Committed to trunk and gcc-9 branch.

2019-10-12  John David Anglin  <danglin@gcc.gnu.org>

	* config/pa/lib2funcs.S (__gcc_plt_call): Load branch target to %r21.
	Load PIC register after branch target.  Fix white space.
	* config/pa/milli64.S ($$dyncall): Separate LINUX and non LINUX
	implementations.  Load PIC register after branch target.  Don't
	clobber function pointer when it points to function descriptor.
	Use nullification instead of branch in LINUX implementation.

Index: config/pa/lib2funcs.S
===================================================================
--- config/pa/lib2funcs.S	(revision 276920)
+++ config/pa/lib2funcs.S	(working copy)
@@ -55,13 +55,13 @@
 	; An inline version of dyncall so we don't have to worry
 	; about long calls to millicode, PIC and other complexities.
 	bb,>=,n %r22,30,L$foo
-        depi 0,31,2,%r22
-        ldw 4(%r22),%r19
-        ldw 0(%r22),%r22
+	depi 0,31,2,%r22
+	ldw 0(%r22),%r21
+	ldw 4(%r22),%r19
 L$foo
-        ldsid (%r22),%r1
-        mtsp %r1,%sr0
-        ble 0(%sr0,%r22)
+	ldsid (%r21),%r1
+	mtsp %r1,%sr0
+	ble 0(%sr0,%r21)
 	copy %r31,%r2
 	ldw -8(%r30),%r2

Index: config/pa/milli64.S
===================================================================
--- config/pa/milli64.S	(revision 276920)
+++ config/pa/milli64.S	(working copy)
@@ -222,19 +222,26 @@
 	.proc
 	.callinfo	millicode
 	.entry
+#ifdef LINUX
+	extru,<>	%r22,30,1,%r0	; nullify if plabel bit set
+	bv,n	%r0(%r22)		; branch to target
+	ldw	-2(%r22),%r21		; load address of target
+	bv	%r0(%r21)		; branch to the real target
+	ldw	2(%r22),%r19		; load new LTP value
+#else
 	bb,>=,n %r22,30,LREF(1)		; branch if not plabel address
-	depi	0,31,2,%r22		; clear the two least significant bits
-	ldw	4(%r22),%r19		; load new LTP value
-	ldw	0(%r22),%r22		; load address of target
+	ldw	-2(%r22),%r21		; load address of target to r21
+	ldsid	(%sr0,%r21),%r1		; get the "space ident" selected by r21
+	ldw	2(%r22),%r19		; load new LTP value
+	mtsp	%r1,%sr0		; move that space identifier into sr0
+	be	0(%sr0,%r21)		; branch to the real target
+	stw	%r2,-24(%r30)		; save return address into frame marker
 LSYM(1)
-#ifdef LINUX
-	bv	%r0(%r22)		; branch to the real target
-#else
 	ldsid	(%sr0,%r22),%r1		; get the "space ident" selected by r22
 	mtsp	%r1,%sr0		; move that space identifier into sr0
-	be	0(%sr0,%r22)		; branch to the real target
+	be	0(%sr0,%r22)		; branch to the target
+	stw	%r2,-24(%r30)		; save return address into frame marker
 #endif
-	stw	%r2,-24(%r30)		; save return address into frame marker
 	.exit
 	.procend
 #endif

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

* [committed]
@ 2005-11-20  5:34 James Morrison
  0 siblings, 0 replies; 3+ messages in thread
From: James Morrison @ 2005-11-20  5:34 UTC (permalink / raw)
  To: gcc-patches


 Hi,

  I bootstrapped and regtested again this patch that.  Diego approved 
this patch a while ago for 4.2.  It is now commited to mainline as r107243.

Jim

2005-08-02  James A. Morrison  <phython@gcc.gnu.org>

	* tree-vrp.c (compare_ranges): Return false for EQ_EXPR if VR0 is less
	than VR1 or vice-versa.

Index: tree-vrp.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/tree-vrp.c,v
retrieving revision 2.47
diff -u -p -r2.47 tree-vrp.c
--- tree-vrp.c	29 Jul 2005 15:21:54 -0000	2.47
+++ tree-vrp.c	30 Jul 2005 18:10:26 -0000
@@ -1677,6 +1710,10 @@ compare_ranges (enum tree_code comp, val
 	  else if (cmp_min != -2 && cmp_max != -2)
 	    return boolean_false_node;
 	}
+      /* If [V0_MIN, V1_MAX] < [V1_MIN, V1_MAX] then V0 != V1.  */
+      else if (compare_values (vr0->min, vr1->max) == 1
+	       || compare_values (vr1->min, vr0->max) == 1)
+	return boolean_false_node;
 
       return NULL_TREE;
     }

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

end of thread, other threads:[~2021-10-22 22:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 22:07 [committed] Tobias Burnus
  -- strict thread matches above, loose matches on Subject: below --
2019-10-12 20:49 [committed] John David Anglin
2005-11-20  5:34 [committed] James Morrison

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).