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
This commit is contained in:
Tobias Burnus 2007-09-12 12:27:27 +02:00 committed by Tobias Burnus
parent dd39f7830a
commit a1dde7d41c
4 changed files with 40 additions and 1 deletions

View File

@ -1,3 +1,10 @@
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.

View File

@ -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:

View File

@ -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

View File

@ -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