summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-15 18:50:17 +0000
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-15 18:50:17 +0000
commite5a4c8ff8f335b6fd9ccd9d24f918fe68370029f (patch)
tree280339d8914657855c3ee4ea1f6c1fe0f773ae61 /gcc
parenta580c29e45675bf0c3ff2ac44243f161e67af163 (diff)
downloadlinaro-gcc-e5a4c8ff8f335b6fd9ccd9d24f918fe68370029f.tar.gz
linaro-gcc-e5a4c8ff8f335b6fd9ccd9d24f918fe68370029f.tar.bz2
linaro-gcc-e5a4c8ff8f335b6fd9ccd9d24f918fe68370029f.zip
fortran/
PR fortran/15140 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion. testsuite/ PR fortran/15140 * gfortran.dg/pr15140.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84770 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog3
-rw-r--r--gcc/fortran/trans-decl.c1
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gfortran.dg/pr15140.f9013
4 files changed, 19 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 2667cb83160..e69b5de1e20 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -4,6 +4,9 @@
* trans-decl.c (gfc_build_function_decl): Create a new chardecl
for every assumed length character dummy argument.
+ PR fortran/15140
+ * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
+
2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/15324
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index f7cfd9785ca..655c48b1ee6 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -1728,7 +1728,6 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, tree fnbody)
assert (sym->attr.dummy);
/* We should always pass assumed size arrays the g77 way. */
- assert (TREE_CODE (sym->backend_decl) == PARM_DECL);
fnbody = gfc_trans_g77_array (sym, fnbody);
break;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index bab21110c6d..ccda3e53332 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -6,6 +6,9 @@
PR fortran/15129
* gfortran.dg/pr15129.f90: New test.
+ PR fortran/15140
+ * gfortran.dg/pr15140.f90: New test.
+
2004-07-14 Mike Stump <mrs@apple.com>
* gcc.dg/20020426-2.c: Improve type safety wrt unsignedness.
diff --git a/gcc/testsuite/gfortran.dg/pr15140.f90 b/gcc/testsuite/gfortran.dg/pr15140.f90
new file mode 100644
index 00000000000..393badcd4ea
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr15140.f90
@@ -0,0 +1,13 @@
+! { dg-do run }
+! PR 15140: we used to fail an assertion, because we don't use the
+! argument of the subroutine directly, but instead use a copy of it.
+function M(NAMES)
+ CHARACTER*(*) NAMES(*)
+ if (any(names.ne."asdfg")) call abort
+ m = LEN(NAMES(1))
+END function M
+
+character(5) :: c(2)
+c = "asdfg"
+if(m(c).ne.5) call abort()
+end