diff options
author | Martin Liska <mliska@suse.cz> | 2021-10-02 09:31:46 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-10-02 11:10:09 +0200 |
commit | bda4aa3673267bdb20b67326072ee3e7e2b29698 (patch) | |
tree | 4bc5d212de20f12a480961665b21347bb1004e2b /gcc/toplev.c | |
parent | fc0beded58a909d6bcdc4af669d89341cdd601c3 (diff) | |
download | gcc-bda4aa3673267bdb20b67326072ee3e7e2b29698.zip gcc-bda4aa3673267bdb20b67326072ee3e7e2b29698.tar.gz gcc-bda4aa3673267bdb20b67326072ee3e7e2b29698.tar.bz2 |
options: fix ASAN issue during saving of opt. options
gcc/ChangeLog:
* toplev.c (toplev::main): save_decoded_options[0] is program
name and so it should be skipped.
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 78bb7e9..d952319 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2338,7 +2338,7 @@ toplev::main (int argc, char **argv) &save_decoded_options_count); /* Save Optimization decoded options. */ - for (unsigned i = 0; i < save_decoded_options_count; ++i) + for (unsigned i = 1; i < save_decoded_options_count; ++i) if (cl_options[save_decoded_options[i].opt_index].flags & CL_OPTIMIZATION) save_opt_decoded_options.safe_push (save_decoded_options[i]); |