From 47c147b03f38ea4218847a77e719584ad47e7d89 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 14 Jan 2016 13:36:12 -0800 Subject: re PR c/69272 (ICE: in c_builtin_function, at c/c-decl.c:4020 with -fgnu-tm) PR c/69272 PR tree-opt/68964 * trans-mem.c (tm_log_emit_stmt): Fix unit size to bit size. * tree.c (build_tm_vector_builtins): Use builtin_decl_explicit_p instead of builtin_decl_declared_p to test for declaration. From-SVN: r232390 --- gcc/ChangeLog | 8 ++++++++ gcc/trans-mem.c | 8 ++++---- gcc/tree.c | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ee96204..ba70e82 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2016-01-14 Richard Henderson + + PR c/69272 + PR tree-opt/68964 + * trans-mem.c (tm_log_emit_stmt): Fix unit size to bit size. + * tree.c (build_tm_vector_builtins): Use builtin_decl_explicit_p + instead of builtin_decl_declared_p to test for declaration. + 2016-01-14 Nicklas Bo Jensen * doc/loop.texi (Loop Analysis and Representation): Document diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index c462307..b204760 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -1229,16 +1229,16 @@ tm_log_emit_stmt (tree addr, gimple *stmt) unhandled_vec: switch (type_size) { - case 1: + case 8: code = BUILT_IN_TM_LOG_1; break; - case 2: + case 16: code = BUILT_IN_TM_LOG_2; break; - case 4: + case 32: code = BUILT_IN_TM_LOG_4; break; - case 8: + case 64: code = BUILT_IN_TM_LOG_8; break; } diff --git a/gcc/tree.c b/gcc/tree.c index e6880f0..8ac2d90 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -10393,7 +10393,7 @@ build_tm_vector_builtins (void) /* By default, 64 bit vectors go through the long long helpers. */ /* If a 128-bit vector is supported, declare those builtins. */ - if (!builtin_decl_declared_p (BUILT_IN_TM_STORE_M128) + if (!builtin_decl_explicit_p (BUILT_IN_TM_STORE_M128) && ((vtype = find_tm_vector_type (128, SImode)) || (vtype = find_tm_vector_type (128, SFmode)))) { @@ -10430,7 +10430,7 @@ build_tm_vector_builtins (void) } /* If a 256-bit vector is supported, declare those builtins. */ - if (!builtin_decl_declared_p (BUILT_IN_TM_STORE_M256) + if (!builtin_decl_explicit_p (BUILT_IN_TM_STORE_M256) && ((vtype = find_tm_vector_type (256, SImode)) || (vtype = find_tm_vector_type (256, SFmode)))) { -- cgit v1.1