summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjanus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-13 18:37:33 +0000
committerjanus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-13 18:37:33 +0000
commitcde48a27b12d2c4d1a5aababb94f6695e9c00469 (patch)
tree16051cebdf05c092a764341cf7620d8571108668
parent053ee6ca2a17c9178576f8106649eeb55b523222 (diff)
downloadgcc-cde48a27b12d2c4d1a5aababb94f6695e9c00469.tar.gz
2011-09-13 Janus Weil <janus@gcc.gnu.org>
PR fortran/50379 * symbol.c (check_conflict): Check conflict between GENERIC and RESULT attributes. 2011-09-13 Janus Weil <janus@gcc.gnu.org> PR fortran/50379 * gfortran.dg/result_2.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178829 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/symbol.c6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/result_2.f909
4 files changed, 23 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 836967d7a4b..6e82538cc31 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2011-09-13 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/50379
+ * symbol.c (check_conflict): Check conflict between GENERIC and RESULT
+ attributes.
+
2011-09-11 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/50327
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index ce4ab3d1c38..b2f0f2b6b78 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -373,7 +373,7 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
*volatile_ = "VOLATILE", *is_protected = "PROTECTED",
*is_bind_c = "BIND(C)", *procedure = "PROCEDURE",
*asynchronous = "ASYNCHRONOUS", *codimension = "CODIMENSION",
- *contiguous = "CONTIGUOUS";
+ *contiguous = "CONTIGUOUS", *generic = "GENERIC";
static const char *threadprivate = "THREADPRIVATE";
const char *a1, *a2;
@@ -490,8 +490,6 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
conf (in_common, codimension);
conf (in_common, result);
- conf (dummy, result);
-
conf (in_equivalence, use_assoc);
conf (in_equivalence, codimension);
conf (in_equivalence, dummy);
@@ -503,7 +501,9 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
conf (in_equivalence, allocatable);
conf (in_equivalence, threadprivate);
+ conf (dummy, result);
conf (entry, result);
+ conf (generic, result);
conf (function, subroutine);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6fe55977ce4..67ccf2659a8 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-13 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/50379
+ * gfortran.dg/result_2.f90: New.
+
2011-09-13 Sevak Sargsyan <sevak.sargsyan@ispras.ru>
* gcc.target/arm/neon-combine-sub-abs-into-vabd.c: New test.
diff --git a/gcc/testsuite/gfortran.dg/result_2.f90 b/gcc/testsuite/gfortran.dg/result_2.f90
new file mode 100644
index 00000000000..eea28e8f2fe
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/result_2.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+!
+! PR 50379: ICE in gfc_typenode_for_spec at fortran/trans-types.c
+!
+! Contributed by Vittorio Zecca <zeccav@gmail.com>
+
+ function f() result(res)
+ interface res ! { dg-error "attribute conflicts with" }
+ end