This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g77 -v broken?


>With essentially current release branch source, bootstrapped on
>i586-pc-linux-gnu, I find that `./g77 -B./ -v' in the build directory
>loops indefinitely after running cpp, so the g77 tests hang.

Looks like this chunk of code in do_spec_1 is broken, in that
it fails to pass a zero-delimited string into the `suffix' array:

                    else
                      {
                        t->length = p - suffix;
                        t->suffix = save_string (suffix, p - suffix);
                        t->unique = (c != 'g');
                        temp_filename = make_temp_file (suffix);
                      }

So when it calls make_temp_file with `suffix', a way-too-long-to-
actually-name-a-file-with suffix gets passed, causing mkstemp
to loop "forever" trying to solve the problem, but can't.
(Looks like it stops after 2^14 tries.)

I'll leave it to the author of the recent do_spec_1 patch to
use make_temp_file to do this, as I might be wrong about just
what is supposed to happen.

        tq vm, (burley)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]