aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-07-04 23:12:57 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2011-07-04 23:12:57 +0200
commitbc9475113ff3731afafca87e6b973863ead02ee5 (patch)
tree5c67c6c8aba7d15ae6686cc245c07a9f537169e0
parentaf421d9cf0a6cbc585e42af653a01619457ecc01 (diff)
downloadgcc-bc9475113ff3731afafca87e6b973863ead02ee5.zip
gcc-bc9475113ff3731afafca87e6b973863ead02ee5.tar.gz
gcc-bc9475113ff3731afafca87e6b973863ead02ee5.tar.bz2
re PR fortran/49623 (Segfault of "gfortran -L" if no argument follows the "-L")
PR fortran/49623 * gfortranspec.c (lang_specific_driver): Ignore options with CL_ERR_MISSING_ARG errors. From-SVN: r175830
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/gfortranspec.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index e2d5d12..001a4bf 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/49623
+ * gfortranspec.c (lang_specific_driver): Ignore options with
+ CL_ERR_MISSING_ARG errors.
+
2011-07-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/49562
diff --git a/gcc/fortran/gfortranspec.c b/gcc/fortran/gfortranspec.c
index 4d939a0..75ce05f 100644
--- a/gcc/fortran/gfortranspec.c
+++ b/gcc/fortran/gfortranspec.c
@@ -255,6 +255,9 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
for (i = 1; i < argc; ++i)
{
+ if (decoded_options[i].errors & CL_ERR_MISSING_ARG)
+ continue;
+
switch (decoded_options[i].opt_index)
{
case OPT_SPECIAL_input_file: