aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-io.c
diff options
context:
space:
mode:
authorTobias Schlüter <tobi@gcc.gnu.org>2005-02-24 19:26:27 +0100
committerTobias Schlüter <tobi@gcc.gnu.org>2005-02-24 19:26:27 +0100
commitcb9e4f55b0bfcbf3b25213774193d4a4bb8a8342 (patch)
tree2139266e39d005be3049810c27d9856644ae20f4 /gcc/fortran/trans-io.c
parentef6201a68e43c0c72daadaafaff4a76dad8b0262 (diff)
downloadgcc-cb9e4f55b0bfcbf3b25213774193d4a4bb8a8342.zip
gcc-cb9e4f55b0bfcbf3b25213774193d4a4bb8a8342.tar.gz
gcc-cb9e4f55b0bfcbf3b25213774193d4a4bb8a8342.tar.bz2
Unrevert previously reversed patch, adding this patch:
* module.c (find_true_name): Deal with NULL module. From-SVN: r95506
Diffstat (limited to 'gcc/fortran/trans-io.c')
-rw-r--r--gcc/fortran/trans-io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index b5ef13f..26f05f1 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -816,7 +816,7 @@ gfc_trans_inquire (gfc_code * code)
static gfc_expr *
-gfc_new_nml_name_expr (char * name)
+gfc_new_nml_name_expr (const char * name)
{
gfc_expr * nml_name;
nml_name = gfc_get_expr();
@@ -825,7 +825,8 @@ gfc_new_nml_name_expr (char * name)
nml_name->ts.kind = gfc_default_character_kind;
nml_name->ts.type = BT_CHARACTER;
nml_name->value.character.length = strlen(name);
- nml_name->value.character.string = name;
+ nml_name->value.character.string = gfc_getmem (strlen (name) + 1);
+ strcpy (nml_name->value.character.string, name);
return nml_name;
}