From 216c9f3fb7156c35477d4df71c3b7fc4f72f6af3 Mon Sep 17 00:00:00 2001 From: burnus Date: Thu, 13 Sep 2007 17:58:10 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128471 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6a5914bdea1..0b1eca4e582 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 c41235de799..01f64e277ed 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 34af18c43b8..fd4a00cb299 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 00000000000..d61b49778c0 --- /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 -- 2.11.4.GIT