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:
parent
dd39f7830a
commit
a1dde7d41c
@ -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.
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
25
gcc/testsuite/gfortran.dg/conflicts_2.f90
Normal file
25
gcc/testsuite/gfortran.dg/conflicts_2.f90
Normal 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
|
Loading…
Reference in New Issue
Block a user