* [PATCH] Fix ICE with gfortran ... -L without argument (PR fortran/49623)
@ 2011-07-04 17:23 Jakub Jelinek
2011-07-04 19:14 ` Paul Richard Thomas
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2011-07-04 17:23 UTC (permalink / raw)
To: Joseph S. Myers, gcc-patches, fortran
Hi!
If -L doesn't have an argument, find_spec_file ICEs on it, as
the argument is NULL. As suggested by Joseph, this disregards in
this loop all options which don't have the required argument.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk/4.6?
2011-07-04 Jakub Jelinek <jakub@redhat.com>
PR fortran/49623
* gfortranspec.c (lang_specific_driver): Ignore options with
CL_ERR_MISSING_ARG errors.
--- gcc/fortran/gfortranspec.c.jj 2011-07-04 14:58:56.000000000 +0200
+++ gcc/fortran/gfortranspec.c 2011-07-04 15:01:58.000000000 +0200
@@ -255,6 +255,9 @@ lang_specific_driver (struct cl_decoded_
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:
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix ICE with gfortran ... -L without argument (PR fortran/49623)
2011-07-04 17:23 [PATCH] Fix ICE with gfortran ... -L without argument (PR fortran/49623) Jakub Jelinek
@ 2011-07-04 19:14 ` Paul Richard Thomas
0 siblings, 0 replies; 2+ messages in thread
From: Paul Richard Thomas @ 2011-07-04 19:14 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Joseph S. Myers, gcc-patches, fortran
Dear Jakub,
Yes! OK for trunk and, if you will, for 4.6.
Thanks
Paul
On Mon, Jul 4, 2011 at 7:22 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> If -L doesn't have an argument, find_spec_file ICEs on it, as
> the argument is NULL. As suggested by Joseph, this disregards in
> this loop all options which don't have the required argument.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> trunk/4.6?
>
> 2011-07-04 Jakub Jelinek <jakub@redhat.com>
>
> PR fortran/49623
> * gfortranspec.c (lang_specific_driver): Ignore options with
> CL_ERR_MISSING_ARG errors.
>
> --- gcc/fortran/gfortranspec.c.jj 2011-07-04 14:58:56.000000000 +0200
> +++ gcc/fortran/gfortranspec.c 2011-07-04 15:01:58.000000000 +0200
> @@ -255,6 +255,9 @@ lang_specific_driver (struct cl_decoded_
>
> 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:
>
> Jakub
>
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-04 19:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-04 17:23 [PATCH] Fix ICE with gfortran ... -L without argument (PR fortran/49623) Jakub Jelinek
2011-07-04 19:14 ` Paul Richard Thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).