mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 14:30:59 +08:00
re PR fortran/27698 (subroutine _foo draws "unclassifiable statement" instead of a useful error.)
fortran/ChangeLog 2007-01-03 Bernhard Fischer <aldot@gcc.gnu.org> PR fortran/27698 * match.c (gfc_match_name): Print diagnostics for invalid character in names. testsuite/ChangeLog 2007-01-03 Bernhard Fischer <aldot@gcc.gnu.org> PR fortran/27698 * gfortran.dg/invalid_name.f90: New test. * gfortran.dg/do_iterator.f90: Adjust pattern for expected error. * gfortran.dg/gomp/pr29759.f90: Ditto. From-SVN: r120549
This commit is contained in:
parent
b881887e66
commit
be58af47f2
@ -1,3 +1,9 @@
|
||||
2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
|
||||
|
||||
PR fortran/27698
|
||||
* match.c (gfc_match_name): Print diagnostics for invalid
|
||||
character in names.
|
||||
|
||||
2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
* array.c: Fix whitespace in comment table.
|
||||
|
@ -396,6 +396,8 @@ gfc_match_name (char *buffer)
|
||||
c = gfc_next_char ();
|
||||
if (!ISALPHA (c))
|
||||
{
|
||||
if (gfc_error_flag_test() == 0)
|
||||
gfc_error ("Invalid character in name at %C");
|
||||
gfc_current_locus = old_loc;
|
||||
return MATCH_NO;
|
||||
}
|
||||
|
@ -1,3 +1,10 @@
|
||||
2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
|
||||
|
||||
PR fortran/27698
|
||||
* gfortran.dg/invalid_name.f90: New test.
|
||||
* gfortran.dg/do_iterator.f90: Adjust pattern for expected error.
|
||||
* gfortran.dg/gomp/pr29759.f90: Ditto.
|
||||
|
||||
2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
* gfortran.dg/present_1.f90: Update error message.
|
||||
|
@ -10,4 +10,4 @@ DO I=1,5 ! { dg-error "cannot be redefined" "changing do-iterator 3" }
|
||||
READ(5,*,iostat=i) j ! { dg-error "cannot be redefined" "changing do-iterator 3" }
|
||||
ENDDO
|
||||
END
|
||||
|
||||
! { dg-error "Invalid character" "character" { target *-*-* } 7 }
|
||||
|
@ -22,21 +22,21 @@ PROGRAM test_omp
|
||||
|
||||
|
||||
!$OMP PARALLEL & ! { dg-error "Unclassifiable OpenMP" }
|
||||
!$ NUM_THREADS(2) ! { dg-error "Unclassifiable" }
|
||||
!$ NUM_THREADS(2) ! { dg-error "Unclassifiable|Invalid character" }
|
||||
!$OMP END PARALLEL ! { dg-error "Unexpected" }
|
||||
|
||||
!$OMP PARALLEL & ! { dg-error "Unclassifiable OpenMP" }
|
||||
!$ & NUM_THREADS(2) ! { dg-error "Unclassifiable" }
|
||||
!$ & NUM_THREADS(2) ! { dg-error "Unclassifiable|Invalid character" }
|
||||
!$OMP END PARALLEL ! { dg-error "Unexpected" }
|
||||
|
||||
!$OMP PARALLEL & ! { dg-error "Unclassifiable OpenMP" }
|
||||
!
|
||||
!$ NUM_THREADS(2) ! { dg-error "Unclassifiable" }
|
||||
!$ NUM_THREADS(2) ! { dg-error "Unclassifiable|Invalid character" }
|
||||
!$OMP END PARALLEL ! { dg-error "Unexpected" }
|
||||
|
||||
!$OMP PARALLEL & ! { dg-error "Unclassifiable OpenMP" }
|
||||
!
|
||||
!$ & NUM_THREADS(2) ! { dg-error "Unclassifiable" }
|
||||
!$ & NUM_THREADS(2) ! { dg-error "Unclassifiable|Invalid character" }
|
||||
!$OMP END PARALLEL ! { dg-error "Unexpected" }
|
||||
|
||||
END PROGRAM
|
||||
|
6
gcc/testsuite/gfortran.dg/invalid_name.f90
Normal file
6
gcc/testsuite/gfortran.dg/invalid_name.f90
Normal file
@ -0,0 +1,6 @@
|
||||
! { dg-do compile }
|
||||
! Tests the fix for PR27698, where names not starting with a letter were
|
||||
! rejected but not diagnosed with a proper message.
|
||||
SUBROUTINE _foo ! { dg-error "Invalid character in name" }
|
||||
END
|
||||
|
Loading…
x
Reference in New Issue
Block a user