This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix ICE on invalid with -Walloca-larger-than (PR tree-optimization/80109)


On 03/20/2017 12:51 PM, Marek Polacek wrote:
We crash with this invalid testcase because we aren't properly checking what we
are passing down to get_range_info, i.e., we can't pass a pointer.  So fixed by
checking the argument first, and calling alloca_type_and_limit if it is of a
wrong type.

Bootstrapped/regtested on x86_64-linux, ok for trunk?

2017-03-20  Marek Polacek  <polacek@redhat.com>
	    Martin Sebor  <msebor@redhat.com>

	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.
OK.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]