diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-06 09:33:29 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-06 09:33:29 +0000 |
commit | aa052e98c758a3b7d87bd5c85a48681255409f95 (patch) | |
tree | 3ae5bb180c0951582422f59678f777a29004329e /gcc/gcc.c | |
parent | 4bbbf12a0a687157743c07ce0aaccf7c2158e9cf (diff) | |
download | gcc-aa052e98c758a3b7d87bd5c85a48681255409f95.tar.gz |
2009-10-06 Ryan Mansfield <rmansfield@qnx.com>
PR driver/41217
* gcc.c (process_command): Check that -o argument was specified.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152488 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index 9be56f2cd02..033c99fbecc 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -4187,7 +4187,10 @@ process_command (int argc, const char **argv) argv[i] = convert_filename (argv[i], ! have_c, 0); #endif /* Save the output name in case -save-temps=obj was used. */ - save_temps_prefix = xstrdup ((p[1] == 0) ? argv[i + 1] : argv[i] + 1); + if ((p[1] == 0) && argv[i + 1]) + save_temps_prefix = xstrdup(argv[i + 1]); + else + save_temps_prefix = xstrdup(argv[i] + 1); goto normal_switch; default: |