Commit f3ef18ff by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/55851 (ICE in size_binop_loc, at fold-const.c:1385)

	PR middle-end/55851
	* fold-const.c (int_binop_types_match_p): Allow all INTEGRAL_TYPE_P
	types instead of just INTEGER_TYPE types.

	* gcc.c-torture/compile/pr55851.c: New test.

Co-Authored-By: Richard Biener <rguenther@suse.de>

From-SVN: r195006
parent 5b42fd01
2013-01-08 Jakub Jelinek <jakub@redhat.com>
Richard Biener <rguenther@suse.de>
PR middle-end/55851
* fold-const.c (int_binop_types_match_p): Allow all INTEGRAL_TYPE_P
types instead of just INTEGER_TYPE types.
2013-01-07 Mark Kettenis <kettenis@openbsd.org>
* config/i386/openbsdelf.h (LIBGCC2_HAS_TF_MODE, LIBGCC2_TF_CEXT,
......
......@@ -900,9 +900,9 @@ associate_trees (location_t loc, tree t1, tree t2, enum tree_code code, tree typ
static bool
int_binop_types_match_p (enum tree_code code, const_tree type1, const_tree type2)
{
if (TREE_CODE (type1) != INTEGER_TYPE && !POINTER_TYPE_P (type1))
if (!INTEGRAL_TYPE_P (type1) && !POINTER_TYPE_P (type1))
return false;
if (TREE_CODE (type2) != INTEGER_TYPE && !POINTER_TYPE_P (type2))
if (!INTEGRAL_TYPE_P (type2) && !POINTER_TYPE_P (type2))
return false;
switch (code)
......
2013-01-08 Jakub Jelinek <jakub@redhat.com>
PR middle-end/55851
* gcc.c-torture/compile/pr55851.c: New test.
PR sanitizer/55844
* c-c++-common/asan/null-deref-1.c: Add -fno-shrink-wrap to
dg-options.
......
/* PR middle-end/55851 */
enum { A = 1UL, B = -1UL } var = A;
void foo (char *);
void
test (void)
{
char vla[1][var];
vla[0][0] = 1;
foo (&vla[0][0]);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment