mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-04 09:14:04 +08:00
re PR middle-end/70747 (ICE on valid code on x86_64-linux-gnu: verify_gimple failed)
2016-04-21 Richard Biener <rguenther@suse.de> PR middle-end/70747 * fold-const.c (fold_comparison): Return properly typed constant boolean. * gcc.dg/pr70747.c: New testcase. From-SVN: r235335
This commit is contained in:
parent
2359e571cd
commit
aef4aab0cc
@ -1,3 +1,9 @@
|
||||
2016-04-21 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/70747
|
||||
* fold-const.c (fold_comparison): Return properly typed
|
||||
constant boolean.
|
||||
|
||||
2016-04-21 Bin Cheng <bin.cheng@arm.com>
|
||||
|
||||
PR tree-optimization/70715
|
||||
|
@ -8676,11 +8676,11 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
|
||||
case EQ_EXPR:
|
||||
case LE_EXPR:
|
||||
case LT_EXPR:
|
||||
return boolean_false_node;
|
||||
return constant_boolean_node (false, type);
|
||||
case GE_EXPR:
|
||||
case GT_EXPR:
|
||||
case NE_EXPR:
|
||||
return boolean_true_node;
|
||||
return constant_boolean_node (true, type);
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2016-04-21 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/70747
|
||||
* gcc.dg/pr70747.c: New testcase.
|
||||
|
||||
2016-04-21 Bin Cheng <bin.cheng@arm.com>
|
||||
|
||||
PR tree-optimization/70715
|
||||
|
10
gcc/testsuite/gcc.dg/pr70747.c
Normal file
10
gcc/testsuite/gcc.dg/pr70747.c
Normal file
@ -0,0 +1,10 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-pedantic" } */
|
||||
|
||||
int *a, b;
|
||||
|
||||
void fn1 ()
|
||||
{
|
||||
a = __builtin_malloc (sizeof(int)*2);
|
||||
b = &a[1] == (0, 0); /* { dg-warning "comparison between pointer and integer" } */
|
||||
}
|
Loading…
Reference in New Issue
Block a user