diff options
author | Tobias Burnus <burnus@net-b.de> | 2007-09-12 12:27:27 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2007-09-12 12:27:27 +0200 |
commit | a1dde7d41c18eccd347c996c282423a6b0056efd (patch) | |
tree | b8bab7cdd48d780330da81ffc8618c7237950f9e /gcc | |
parent | dd39f7830a217efd7528ff0bfacb8163ebae7b9f (diff) | |
download | gcc-a1dde7d41c18eccd347c996c282423a6b0056efd.zip gcc-a1dde7d41c18eccd347c996c282423a6b0056efd.tar.gz gcc-a1dde7d41c18eccd347c996c282423a6b0056efd.tar.bz2 |
re PR fortran/33284 (ENTRY and INTRINSIC with same name)
2007-09-12 Tobias Burnus <burnus@net-b.de>
PR fortran/33284
PR fortran/33310
* symbol.c (check_conflict): Add conflict between INTRINSIC and ENTRY
and between BIND(C) and PARAMETER.
2007-09-12 Tobias Burnus <burnus@net-b.de>
PR fortran/33284
PR fortran/33310
* gfortran.dg/conflicts_2.f90: New.
From-SVN: r128423
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/symbol.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/conflicts_2.f90 | 25 |
4 files changed, 40 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index f16d667..e726660 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,12 @@ 2007-09-12 Tobias Burnus <burnus@net-b.de> + PR fortran/33284 + PR fortran/33310 + * symbol.c (check_conflict): Add conflict between INTRINSIC and ENTRY + and between BIND(C) and PARAMETER. + +2007-09-12 Tobias Burnus <burnus@net-b.de> + * trans-expr.c (gfc_conv_initializer): Fix expr == NULL check. 2007-09-12 Jan Hubicka <jh@suse.cz> diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 69a675b..c41235d 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -437,6 +437,7 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where) conf (external, dimension); /* See Fortran 95's R504. */ conf (external, intrinsic); + conf (entry, intrinsic); if ((attr->if_source && !attr->procedure) || attr->contained) { @@ -673,8 +674,8 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where) conf2 (value); conf2 (volatile_); conf2 (threadprivate); - /* TODO: hmm, double check this. */ conf2 (value); + conf2 (is_bind_c); break; default: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cce7b21..f1bf054 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2007-09-12 Tobias Burnus <burnus@net-b.de> + + PR fortran/33284 + PR fortran/33310 + * gfortran.dg/conflicts_2.f90: New. + 2007-09-12 Ira Rosen <irar@il.ibm.com> PR tree-optimization/32377 diff --git a/gcc/testsuite/gfortran.dg/conflicts_2.f90 b/gcc/testsuite/gfortran.dg/conflicts_2.f90 new file mode 100644 index 0000000..6656672 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/conflicts_2.f90 @@ -0,0 +1,25 @@ +! { dg-do compile } +! +! Check conflicts: +! - PARAMETER and BIND(C), PR fortran/33310 +! - INTRINSIC and ENTRY, PR fortran/33284 +! + +subroutine a + intrinsic cos +entry cos(x) ! { dg-error "ENTRY attribute conflicts with INTRINSIC" } + real x + x = 0 +end subroutine + +module m + use iso_c_binding + implicit none + TYPE, bind(C) :: the_distribution + INTEGER(c_int) :: parameters(1) + END TYPE the_distribution + TYPE (the_distribution), parameter, bind(C) :: & ! { dg-error "PARAMETER attribute conflicts with BIND.C." } + the_beta = the_distribution((/0/)) +end module m + +end |