diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-10 19:32:22 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-10 19:32:22 +0000 |
commit | 90acbb6ed46459e9b3ca75d94faae290bc421539 (patch) | |
tree | 233938d2d4b1d2f382d5d719495bb4278e21dd78 /gcc/fortran | |
parent | a59d296903740487a8a55623d9b7b9be9e50a558 (diff) | |
download | gcc-90acbb6ed46459e9b3ca75d94faae290bc421539.tar.gz |
2013-10-09 Tobias Burnus <burnus@net-b.de>
PR fortran/58226
* options.c (gfc_get_option_string): Handle zero arg case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203394 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/options.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 4463ecd84dc..2a3be8d64f2 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2013-10-10 Tobias Burnus <burnus@net-b.de> + + PR fortran/58226 + * options.c (gfc_get_option_string): Handle zero arg case. + 2013-10-02 Tobias Burnus <burnus@net-b.de> PR fortran/58593 diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index 3a9c508dc27..6e4e7c11696 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -1166,6 +1166,10 @@ gfc_get_option_string (void) size_t len, pos; char *result; + /* Allocate and return a one-character string with '\0'. */ + if (!save_decoded_options_count) + return XCNEWVEC (char, 1); + /* Determine required string length. */ len = 0; |