re PR middle-end/38428 (ice for Linux kernel code with -O2)
PR middle-end/38428 * tree-ssa-operands.c (get_expr_operands) <case BIT_FIELD_REF>: Set gimple_set_has_volatile_ops if the BIT_FIELD_REF is volatile. * gcc.c-torture/compile/pr38428.c: New test. From-SVN: r142527
This commit is contained in:
parent
8b86bdbc02
commit
f11bea25dd
@ -1,3 +1,9 @@
|
||||
2008-12-06 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/38428
|
||||
* tree-ssa-operands.c (get_expr_operands) <case BIT_FIELD_REF>: Set
|
||||
gimple_set_has_volatile_ops if the BIT_FIELD_REF is volatile.
|
||||
|
||||
2008-12-07 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* gthr-single.h (__gthread_once): Adjust prototype to match all
|
||||
|
@ -1,5 +1,8 @@
|
||||
2008-12-06 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/38428
|
||||
* gcc.c-torture/compile/pr38428.c: New test.
|
||||
|
||||
PR middle-end/38422
|
||||
* gcc.c-torture/execute/pr38422.c: New test.
|
||||
|
||||
|
20
gcc/testsuite/gcc.c-torture/compile/pr38428.c
Normal file
20
gcc/testsuite/gcc.c-torture/compile/pr38428.c
Normal file
@ -0,0 +1,20 @@
|
||||
/* PR middle-end/38428 */
|
||||
|
||||
struct S
|
||||
{
|
||||
volatile struct
|
||||
{
|
||||
unsigned int t : 1;
|
||||
} s;
|
||||
};
|
||||
|
||||
int
|
||||
foo (struct S *x)
|
||||
{
|
||||
int ret;
|
||||
if (x->s.t)
|
||||
ret = 0;
|
||||
else
|
||||
ret = 10;
|
||||
return ret;
|
||||
}
|
@ -2010,6 +2010,10 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags)
|
||||
}
|
||||
|
||||
case BIT_FIELD_REF:
|
||||
if (TREE_THIS_VOLATILE (expr))
|
||||
gimple_set_has_volatile_ops (stmt, true);
|
||||
/* FALLTHRU */
|
||||
|
||||
case TRUTH_NOT_EXPR:
|
||||
case VIEW_CONVERT_EXPR:
|
||||
do_unary:
|
||||
|
Loading…
Reference in New Issue
Block a user