From: Sam James Date: Thu, 27 Mar 2025 00:14:21 +0000 (+0000) Subject: testsuite: fortran: fix dg syntax errors X-Git-Tag: basepoints/gcc-16~599 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fed26e59d6771004a0649a98b1a16fa28a9bb1bd;p=thirdparty%2Fgcc.git testsuite: fortran: fix dg syntax errors No change in test results. The changes other than the first are arguably not errors, but still clearly wrong and mistakes. gcc/testsuite/ChangeLog: * gfortran.dg/associate_70.f90: Replace parenthesis with '}'. * gfortran.dg/bessel_3.f90: Drop extraneous parenthesis. * gfortran.dg/c_funloc_tests_6.f90: Ditto. * gfortran.dg/parity_2.f90: Ditto. --- diff --git a/gcc/testsuite/gfortran.dg/associate_70.f90 b/gcc/testsuite/gfortran.dg/associate_70.f90 index ddb38b84c4b..6f8f5d6a7cb 100644 --- a/gcc/testsuite/gfortran.dg/associate_70.f90 +++ b/gcc/testsuite/gfortran.dg/associate_70.f90 @@ -1,5 +1,5 @@ ! { dg-do run } -! ( dg-options "-Wuninitialized" ) +! { dg-options "-Wuninitialized" } ! ! Test fix for PR115700 comment 5, in which ‘.tmp1’ is used uninitialized and ! both normal and scalarized array references did not work correctly. diff --git a/gcc/testsuite/gfortran.dg/bessel_3.f90 b/gcc/testsuite/gfortran.dg/bessel_3.f90 index 51e11e9160a..4191d2478cd 100644 --- a/gcc/testsuite/gfortran.dg/bessel_3.f90 +++ b/gcc/testsuite/gfortran.dg/bessel_3.f90 @@ -6,7 +6,7 @@ ! IMPLICIT NONE print *, SIN (1.0) -print *, BESSEL_J0(1.0) ! { dg-error "has no IMPLICIT type" }) +print *, BESSEL_J0(1.0) ! { dg-error "has no IMPLICIT type" } print *, BESSEL_J1(1.0) ! { dg-error "has no IMPLICIT type" } print *, BESSEL_JN(1,1.0) ! { dg-error "has no IMPLICIT type|Type mismatch" } print *, BESSEL_JN(1,2,1.0) ! { dg-error "has no IMPLICIT type|Type mismatch|More actual than formal" } diff --git a/gcc/testsuite/gfortran.dg/c_funloc_tests_6.f90 b/gcc/testsuite/gfortran.dg/c_funloc_tests_6.f90 index 45d095566d1..d8c8039e258 100644 --- a/gcc/testsuite/gfortran.dg/c_funloc_tests_6.f90 +++ b/gcc/testsuite/gfortran.dg/c_funloc_tests_6.f90 @@ -20,7 +20,7 @@ procedure(sub), pointer :: fsub integer, external :: noCsub procedure(integer), pointer :: fint -cp = c_funloc (sub) ! { dg-error "Cannot convert TYPE.c_funptr. to TYPE.c_ptr." }) +cp = c_funloc (sub) ! { dg-error "Cannot convert TYPE.c_funptr. to TYPE.c_ptr." } cfp = c_loc (int) ! { dg-error "Cannot convert TYPE.c_ptr. to TYPE.c_funptr." } call c_f_pointer (cfp, int) ! { dg-error "Argument CPTR at .1. to C_F_POINTER shall have the type TYPE.C_PTR." } diff --git a/gcc/testsuite/gfortran.dg/parity_2.f90 b/gcc/testsuite/gfortran.dg/parity_2.f90 index 5ff11dab9d9..9a8e0357d67 100644 --- a/gcc/testsuite/gfortran.dg/parity_2.f90 +++ b/gcc/testsuite/gfortran.dg/parity_2.f90 @@ -6,7 +6,7 @@ ! Check implementation of PARITY ! implicit none -print *, parity([real ::]) ! { dg-error "must be LOGICAL" }) +print *, parity([real ::]) ! { dg-error "must be LOGICAL" } print *, parity([integer ::]) ! { dg-error "must be LOGICAL" } print *, parity([logical ::]) print *, parity(.true.) ! { dg-error "must be an array" }