Commit Graph

7 Commits

Author SHA1 Message Date
Marek Polacek edc1747f1f re PR tree-optimization/80109 (ICE in get_range_info, at tree-ssanames.c:375)
PR tree-optimization/80109
	* gimple-ssa-warn-alloca.c (alloca_call_type): Only call get_range_info
	on INTEGRAL_TYPE_P.

	* gcc.dg/Walloca-14.c: New test.

Co-Authored-By: Martin Sebor <msebor@redhat.com>

From-SVN: r246325
2017-03-21 16:21:14 +00:00
Jakub Jelinek 72772e6761 re PR tree-optimization/79972 (ICE in tree check: expected ssa_name, have var_decl in get_range_info, at tree-ssanames.c:377 w/ -Walloca -Wvla-larger-than=364854541)
PR tree-optimization/79972
	* gimple-ssa-warn-alloca.c (alloca_call_type): Only call
	get_range_info on SSA_NAMEs.  Formatting fixes.

	* gcc.dg/pr79972.c: New test.

From-SVN: r246022
2017-03-10 08:55:00 +01:00
Marek Polacek d8a90142db re PR middle-end/79809 (ICE in alloca_call_type, at gimple-ssa-warn-alloca.c:282)
PR middle-end/79809
	* gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
	(alloca_call_type): Likewise.

	* g++.dg/Walloca1.C: New test.

From-SVN: r245955
2017-03-07 17:30:53 +00:00
Aldy Hernandez 4cd7b1a9e0 re PR middle-end/79123 (incorrect -Walloca-larger-than: alloca may be too large due to conversion from long int to long unsigned int)
PR middle-end/79123
	* gimple-ssa-warn-alloca.c (alloca_call_type): Make sure
	casts from signed to unsigned really don't have a range.

From-SVN: r244859
2017-01-24 09:50:33 +00:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Aldy Hernandez cc9037a6e9 re PR middle-end/78328 (wrong wording for unbounded alloc case in -Walloca-larger-than note)
PR middle-end/78328
	* gimple-ssa-warn-alloca.c (alloca_call_type): Handle
	VR_ANTI_RANGE.

From-SVN: r243174
2016-12-02 12:20:42 +00:00
Aldy Hernandez adc577c558 Makefile.in (OBJS): Add gimple-ssa-warn-alloca.o.
* Makefile.in (OBJS): Add gimple-ssa-warn-alloca.o.
	* passes.def: Add two instances of pass_walloca.
	* tree-pass.h (make_pass_walloca): New.
	* gimple-ssa-warn-walloca.c: New file.
	* doc/invoke.texi: Document -Walloca, -Walloca-larger-than=, and
	-Wvla-larger-than= options.

From-SVN: r241318
2016-10-18 21:40:58 +00:00