diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-03-18 11:47:46 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-03-19 06:39:51 -0700 |
commit | 5e2eabe1eed1e53d39923517122d3c7de2013ad4 (patch) | |
tree | 8deccc1872103afd64901a30b5ef53a68078fbb5 /gcc/config/i386/i386.h | |
parent | 21d09cb732dac5d980ac628eb3aca75c821028a2 (diff) | |
download | gcc-5e2eabe1eed1e53d39923517122d3c7de2013ad4.zip gcc-5e2eabe1eed1e53d39923517122d3c7de2013ad4.tar.gz gcc-5e2eabe1eed1e53d39923517122d3c7de2013ad4.tar.bz2 |
x86: Issue error for return/argument only with function body
If we never generate function body, we shouldn't issue errors for return
nor argument. Add silent_p to i386 machine_function to avoid issuing
errors for return and argument without function body.
gcc/
PR target/99652
* config/i386/i386-options.c (ix86_init_machine_status): Set
silent_p to true.
* config/i386/i386.c (init_cumulative_args): Set silent_p to
false.
(construct_container): Return early for return and argument
errors if silent_p is true.
* config/i386/i386.h (machine_function): Add silent_p.
gcc/testsuite/
PR target/99652
* gcc.dg/torture/pr99652-1.c: New test.
* gcc.dg/torture/pr99652-2.c: Likewise.
* gcc.target/i386/pr57655.c: Adjusted.
* gcc.target/i386/pr59794-6.c: Likewise.
* gcc.target/i386/pr70738-1.c: Likewise.
* gcc.target/i386/pr96744-1.c: Likewise.
Diffstat (limited to 'gcc/config/i386/i386.h')
-rw-r--r-- | gcc/config/i386/i386.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 4874910..058c1cc 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2945,6 +2945,10 @@ struct GTY(()) machine_function { function. */ BOOL_BITFIELD has_explicit_vzeroupper : 1; + /* True if we should act silently, rather than raise an error for + invalid calls. */ + BOOL_BITFIELD silent_p : 1; + /* The largest alignment, in bytes, of stack slot actually used. */ unsigned int max_used_stack_alignment; |