From e3bfd8f4169dbe03574a3ce1efc91d23f5877f9c Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Thu, 13 Sep 2007 19:58:10 +0200 Subject: re PR fortran/33412 (Bind(C): ELEMENTAL procedure conflicts with BIND(C)) 2007-09-13 Tobias Burnus PR fortran/33412 * symbol.c (check_conflict): Add conflict of ELEMENTAL with Bind(C). 2007-09-13 Tobias Burnus PR fortran/33412 * gfortran.dg/elemental_bind_c.f90: New. From-SVN: r128471 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/symbol.c | 1 + gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/elemental_bind_c.f90 | 10 ++++++++++ 4 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/elemental_bind_c.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6a5914b..0b1eca4 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2007-09-13 Tobias Burnus + + PR fortran/33412 + * symbol.c (check_conflict): Add conflict of ELEMENTAL with Bind(C). + 2007-09-12 Tobias Burnus PR fortran/33297 diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index c41235d..01f64e2 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -480,6 +480,7 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where) conf (is_bind_c, cray_pointer); conf (is_bind_c, cray_pointee); conf (is_bind_c, allocatable); + conf (is_bind_c, elemental); /* Need to also get volatile attr, according to 5.1 of F2003 draft. Parameter conflict caught below. Also, value cannot be specified diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 34af18c..fd4a00c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-09-13 Tobias Burnus + + PR fortran/33412 + * gfortran.dg/elemental_bind_c.f90: New. + 2007-09-13 Richard Sandiford * gcc.dg/gcc-have-sync-compare-and-swap.c: Skip for -mflip-mips16. diff --git a/gcc/testsuite/gfortran.dg/elemental_bind_c.f90 b/gcc/testsuite/gfortran.dg/elemental_bind_c.f90 new file mode 100644 index 0000000..d61b497 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/elemental_bind_c.f90 @@ -0,0 +1,10 @@ +! {dg-do compile } +! +! PR fortran/33412 +! +elemental subroutine a() bind(c) ! { dg-error "BIND.C. attribute conflicts with ELEMENTAL" } +end subroutine a ! { dg-error "Expecting END PROGRAM" } + +elemental function b() bind(c) ! { dg-error "BIND.C. attribute conflicts with ELEMENTAL" } +end function b ! { dg-error "Expecting END PROGRAM" } +end -- cgit v1.1