aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/data.cc
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2023-01-21 15:19:57 -0800
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2023-01-21 15:23:19 -0800
commit48f544ad5c98b668d8d345eaafcf09cc0bd44635 (patch)
tree49ad97c23b0cdbe5d5d3b5ac8945f48133a7eaf5 /gcc/fortran/data.cc
parent046dc9d0d4683bab99d28983d8841ba3c56ef744 (diff)
downloadgcc-48f544ad5c98b668d8d345eaafcf09cc0bd44635.zip
gcc-48f544ad5c98b668d8d345eaafcf09cc0bd44635.tar.gz
gcc-48f544ad5c98b668d8d345eaafcf09cc0bd44635.tar.bz2
fortran: [PR102595]
PR fortran/102595 gcc/fortran/ChangeLog: * data.cc (gfc_assign_data_value): Remove check for PARAMETER in DATA. * primary.cc (match_variable): Add check for PARAMETER in DATA. gcc/testsuite/ChangeLog: * gfortran.dg/pr88048.f90: Adjust for changed error message. * gfortran.dg/parameter_data0.f90: New test.
Diffstat (limited to 'gcc/fortran/data.cc')
-rw-r--r--gcc/fortran/data.cc7
1 files changed, 0 insertions, 7 deletions
diff --git a/gcc/fortran/data.cc b/gcc/fortran/data.cc
index 443d35d..d29eb12 100644
--- a/gcc/fortran/data.cc
+++ b/gcc/fortran/data.cc
@@ -244,13 +244,6 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index,
"array-element nor a scalar-structure-component";
symbol = lvalue->symtree->n.sym;
- if (symbol->attr.flavor == FL_PARAMETER)
- {
- gfc_error ("PARAMETER %qs shall not appear in a DATA statement at %L",
- symbol->name, &lvalue->where);
- return false;
- }
-
init = symbol->value;
last_ts = &symbol->ts;
last_con = NULL;