Skip to content
Snippets Groups Projects
Commit f974b54b authored by Martin Sebor's avatar Martin Sebor
Browse files

Avoid -Walloca-larger-than and -Wvla-larger-than false postives and negatives.

Resolves:
PR middle-end/100425 - missing -Walloca-larger-than with -O0
PR middle-end/100510 - bogus -Wvla-large-than with -Walloca

gcc/ChangeLog:

	PR middle-end/100425
	PR middle-end/100510
	* gimple-ssa-warn-alloca.c (pass_walloca::firast_time_p): Rename...
	(pass_walloca::xlimit_certain_p): ...to this.
	(pass_walloca::gate): Execute for any kind of handled warning.
	(pass_walloca::execute): Avoid issuing "maybe" and "unbounded"
	warnings when xlimit_certain_p is set.

gcc/testsuite/ChangeLog:

	PR middle-end/100425
	PR middle-end/100510
	* c-c++-common/Walloca-larger-than.C: New test.
	* gcc.dg/Walloca-larger-than-4.c: New test.
	* gcc.dg/Wvla-larger-than-5.c: New test.
	* gcc.dg/pr79972.c: Remove unexpected warning directive.
parent 51d89e61
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment