aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2007-09-13 19:58:10 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2007-09-13 19:58:10 +0200
commite3bfd8f4169dbe03574a3ce1efc91d23f5877f9c (patch)
treeef43aa720e7e1fea2f35e763e4b0544867c0b134 /gcc
parent6ed44ca10a149337f97671522772e5bd5adbdb28 (diff)
downloadgcc-e3bfd8f4169dbe03574a3ce1efc91d23f5877f9c.zip
gcc-e3bfd8f4169dbe03574a3ce1efc91d23f5877f9c.tar.gz
gcc-e3bfd8f4169dbe03574a3ce1efc91d23f5877f9c.tar.bz2
re PR fortran/33412 (Bind(C): ELEMENTAL procedure conflicts with BIND(C))
2007-09-13 Tobias Burnus <burnus@net-b.de> PR fortran/33412 * symbol.c (check_conflict): Add conflict of ELEMENTAL with Bind(C). 2007-09-13 Tobias Burnus <burnus@net-b.de> PR fortran/33412 * gfortran.dg/elemental_bind_c.f90: New. From-SVN: r128471
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/symbol.c1
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_bind_c.f9010
4 files changed, 21 insertions, 0 deletions
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 <burnus@net-b.de>
+
+ PR fortran/33412
+ * symbol.c (check_conflict): Add conflict of ELEMENTAL with Bind(C).
+
2007-09-12 Tobias Burnus <burnus@net-b.de>
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 <burnus@net-b.de>
+
+ PR fortran/33412
+ * gfortran.dg/elemental_bind_c.f90: New.
+
2007-09-13 Richard Sandiford <richard@codesourcery.com>
* 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