re PR c/48685 (ICE in gimplify_expr, at gimplify.c:7034)
PR c/48685 * fold-const.c (fold_convert_loc): Add NOP_EXPR when casting to VOID_TYPE even around MODIFY_EXPR. * gcc.dg/pr48685.c: New test. From-SVN: r172895
This commit is contained in:
parent
ff9419990b
commit
16997bc011
@ -1,3 +1,9 @@
|
||||
2011-04-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/48685
|
||||
* fold-const.c (fold_convert_loc): Add NOP_EXPR when casting
|
||||
to VOID_TYPE even around MODIFY_EXPR.
|
||||
|
||||
2011-04-22 Mike Stump <mikestump@comcast.net>
|
||||
|
||||
* gensupport.c (read_md_rtx): Fix typo in comment.
|
||||
|
@ -2029,8 +2029,6 @@ fold_convert_loc (location_t loc, tree type, tree arg)
|
||||
|
||||
case VOID_TYPE:
|
||||
tem = fold_ignored_result (arg);
|
||||
if (TREE_CODE (tem) == MODIFY_EXPR)
|
||||
goto fold_convert_exit;
|
||||
return fold_build1_loc (loc, NOP_EXPR, type, tem);
|
||||
|
||||
default:
|
||||
|
@ -1,3 +1,8 @@
|
||||
2011-04-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/48685
|
||||
* gcc.dg/pr48685.c: New test.
|
||||
|
||||
2011-04-22 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* gcc.dg/tree-ssa/pr38699.c: Fix testcase.
|
||||
|
11
gcc/testsuite/gcc.dg/pr48685.c
Normal file
11
gcc/testsuite/gcc.dg/pr48685.c
Normal file
@ -0,0 +1,11 @@
|
||||
/* PR c/48685 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int v = 1;
|
||||
(void) (1 == 2 ? (void) 0 : (v = 0));
|
||||
return v;
|
||||
}
|
Loading…
Reference in New Issue
Block a user