Commit 1f6dba54 by Jakub Jelinek Committed by Jakub Jelinek

re PR sanitizer/79897 (ICE in gimplify_modify_expr, at gimplify.c:5627 on ARM target)

	PR sanitizer/79897
	* ubsan.c (ubsan_encode_value): Call mark_addressable on the
	temporary.

	* c-c++-common/ubsan/pr79897.c: New test.

From-SVN: r245945
parent 45174dec
2017-03-07 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/79897
* ubsan.c (ubsan_encode_value): Call mark_addressable on the
temporary.
2017-03-06 Jakub Jelinek <jakub@redhat.com> 2017-03-06 Jakub Jelinek <jakub@redhat.com>
PR c++/79821 PR c++/79821
......
2017-03-07 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/79897
* c-c++-common/ubsan/pr79897.c: New test.
2017-03-06 Vladimir Makarov <vmakarov@redhat.com> 2017-03-06 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/79571 PR rtl-optimization/79571
......
/* PR sanitizer/79897 */
/* { dg-do compile } */
/* { dg-options "-fsanitize=enum -O2" } */
enum E
{
A = 0,
B = ~0U + 1LL
} x = A;
int
main ()
{
return x != A;
}
...@@ -145,6 +145,7 @@ ubsan_encode_value (tree t, bool in_expand_p) ...@@ -145,6 +145,7 @@ ubsan_encode_value (tree t, bool in_expand_p)
code by making vars unnecessarily addressable. */ code by making vars unnecessarily addressable. */
tree var = create_tmp_var (type); tree var = create_tmp_var (type);
tree tem = build2 (MODIFY_EXPR, void_type_node, var, t); tree tem = build2 (MODIFY_EXPR, void_type_node, var, t);
mark_addressable (var);
if (in_expand_p) if (in_expand_p)
{ {
rtx mem rtx mem
......
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