From: Tobias Burnus Date: Mon, 20 Nov 2006 20:04:24 +0000 (+0100) Subject: symbol.c (check_conflict): Add conflict between VOLATILE attribute and program name. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d7043acd94f8d8d6c93465ca4a98d07e5a2fb163;p=gcc.git symbol.c (check_conflict): Add conflict between VOLATILE attribute and program name. fortran/ 2006-11-20 Tobias Burnus * symbol.c (check_conflict): Add conflict between VOLATILE attribute and program name. testsuite/ 2006-11-20 Tobias Burnus * gfortran.dg/volatile3.f90: Add conflict test. From-SVN: r119025 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index da741c6faff..a88071a4289 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2006-11-20 Tobias Burnus + + * symbol.c (check_conflict): Add conflict between VOLATILE + attribute and program name. + 2006-11-20 Bernhard Fischer PR fortran/24783 diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index d867de9fcfc..7982920b4fa 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -432,6 +432,7 @@ check_conflict (symbol_attribute * attr, const char * name, locus * where) conf2 (dimension); conf2 (dummy); conf2 (save); + conf2 (volatile_); conf2 (pointer); conf2 (target); conf2 (external); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bda06241fd7..046b230c798 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2006-11-20 Tobias Burnus + + * gfortran.dg/volatile3.f90: Add conflict test. + 2006-11-20 Bernhard Fischer PR fortran/24783 diff --git a/gcc/testsuite/gfortran.dg/volatile3.f90 b/gcc/testsuite/gfortran.dg/volatile3.f90 index 46619eb6bce..966272eecd2 100644 --- a/gcc/testsuite/gfortran.dg/volatile3.f90 +++ b/gcc/testsuite/gfortran.dg/volatile3.f90 @@ -13,6 +13,7 @@ program volatile_test real, volatile,volatile :: r = 3. ! { dg-error "Duplicate VOLATILE attribute" } volatile :: l,n ! { dg-error "Duplicate VOLATILE attribute" } volatile ! { dg-error "Syntax error in VOLATILE statement" } + volatile :: volatile_test ! { dg-error "PROGRAM attribute conflicts with VOLATILE attribute" } l = 4.0 m = 3.0 contains