Re: PR c++/55513: do not fold away builtins in COMPOUND_EXPRs

2012-12-07 Thread Jason Merrill
OK. Jason

Re: PR c++/55513: do not fold away builtins in COMPOUND_EXPRs

2012-12-07 Thread Aldy Hernandez
On 12/07/12 14:28, Jason Merrill wrote: On 12/07/2012 01:08 PM, Aldy Hernandez wrote: + if (!TREE_CONSTANT (new_call)) +*non_constant_p = true; You can use VERIFY_CONSTANT here instead. OK with that change. Jason VERIFY_CONSTANT is defined further down, so I moved things around. OK

Re: PR c++/55513: do not fold away builtins in COMPOUND_EXPRs

2012-12-07 Thread Jason Merrill
On 12/07/2012 01:08 PM, Aldy Hernandez wrote: + if (!TREE_CONSTANT (new_call)) +*non_constant_p = true; You can use VERIFY_CONSTANT here instead. OK with that change. Jason

PR c++/55513: do not fold away builtins in COMPOUND_EXPRs

2012-12-07 Thread Aldy Hernandez
The problem here is that we fold away calls to built-ins in COMPOUND_EXPRs such as: const int t = (__builtin_memcpy (s, "Hello", 6), 777); Since we return true for any built-in in potential_constant_expression_1, this means that check_initializer->store_init_value->maybe_constant_init will ch