re PR fortran/49623 (Segfault of "gfortran -L" if no argument follows the "-L")
authorJakub Jelinek <jakub@redhat.com>
Mon, 4 Jul 2011 21:12:57 +0000 (23:12 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 4 Jul 2011 21:12:57 +0000 (23:12 +0200)
PR fortran/49623
* gfortranspec.c (lang_specific_driver): Ignore options with
CL_ERR_MISSING_ARG errors.

From-SVN: r175830

gcc/fortran/ChangeLog
gcc/fortran/gfortranspec.c

index e2d5d124dac0024a4e9845daa48968074a9e1d13..001a4bf1ed9ed4daf7860400c3fcf58edbcb2e63 100644 (file)
@@ -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
index 4d939a05bf8683b874ce39a2624705d6a7a5a2d3..75ce05fca1c9795e709e60c5f514bf53501a1275 100644 (file)
@@ -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: