Commit 5f92d109 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/84444 (ICE with __builtin_launder and cast)

	PR c++/84444
	* builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
	is ADDR_EXPR.

	* g++.dg/cpp1z/launder8.C: New test.

From-SVN: r257822
parent 4382537d
2018-02-19 Jakub Jelinek <jakub@redhat.com> 2018-02-19 Jakub Jelinek <jakub@redhat.com>
PR c++/84444
* builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
is ADDR_EXPR.
PR tree-optimization/84452 PR tree-optimization/84452
* tree-vect-patterns.c (vect_recog_pow_pattern): Don't call * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
......
...@@ -7836,8 +7836,7 @@ builtin_mathfn_code (const_tree t) ...@@ -7836,8 +7836,7 @@ builtin_mathfn_code (const_tree t)
const_tree argtype, parmtype; const_tree argtype, parmtype;
const_call_expr_arg_iterator iter; const_call_expr_arg_iterator iter;
if (TREE_CODE (t) != CALL_EXPR if (TREE_CODE (t) != CALL_EXPR)
|| TREE_CODE (CALL_EXPR_FN (t)) != ADDR_EXPR)
return END_BUILTINS; return END_BUILTINS;
fndecl = get_callee_fndecl (t); fndecl = get_callee_fndecl (t);
......
2018-02-19 Jakub Jelinek <jakub@redhat.com> 2018-02-19 Jakub Jelinek <jakub@redhat.com>
PR c++/84444
* g++.dg/cpp1z/launder8.C: New test.
PR c++/84448 PR c++/84448
* g++.dg/gomp/pr84448.C: New test. * g++.dg/gomp/pr84448.C: New test.
......
// PR c++/84444
// { dg-do compile }
// { dg-options "-O2" }
struct A {};
__UINTPTR_TYPE__
foo (A *p)
{
return (__UINTPTR_TYPE__) __builtin_launder (p);
}
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