Computing the assembler name of a builtin function prevents the middle-end from open coding the builtin. This was causing assembly differences between the non-pph and pph compiles.
Tested on x86_64. Committed to branch. Diego. cp/ChangeLog.pph * pph-streamer.c (pph_merge_name): Do not mangle names for builtin functions. testsuite/ChangeLog.pph * g++.dg/pph/p2pr36533.cc: Mark fixed. * g++.dg/pph/p4mean.cc: Likewise. * g++.dg/pph/p4pr36533.cc: Likewise. diff --git a/gcc/cp/pph-streamer.c b/gcc/cp/pph-streamer.c index 7bcff92..ed2dfca 100644 --- a/gcc/cp/pph-streamer.c +++ b/gcc/cp/pph-streamer.c @@ -577,7 +577,7 @@ pph_get_signature (tree t, size_t *nbytes_p) tree pph_merge_name (tree expr) { - if (TREE_CODE (expr) == FUNCTION_DECL) + if (TREE_CODE (expr) == FUNCTION_DECL && !DECL_BUILT_IN (expr)) return DECL_ASSEMBLER_NAME (expr); else return DECL_NAME (expr); diff --git a/gcc/testsuite/g++.dg/pph/p2pr36533.cc b/gcc/testsuite/g++.dg/pph/p2pr36533.cc index 8ff602a..3797327 100644 --- a/gcc/testsuite/g++.dg/pph/p2pr36533.cc +++ b/gcc/testsuite/g++.dg/pph/p2pr36533.cc @@ -1,6 +1,2 @@ /* { dg-options "-w -fpermissive" } */ -// pph asm xdiff 25347 -// xfail BOGUS INTRINSIC -// failing to recognise memset as an intrinsic - #include "p1pr36533.h" diff --git a/gcc/testsuite/g++.dg/pph/p4mean.cc b/gcc/testsuite/g++.dg/pph/p4mean.cc index 80c2db6..e832ce5 100644 --- a/gcc/testsuite/g++.dg/pph/p4mean.cc +++ b/gcc/testsuite/g++.dg/pph/p4mean.cc @@ -1,8 +1,4 @@ /* { dg-options "-w -fpermissive" } */ -// pph asm xdiff 39234 -// xfail BOGUS INTRINSIC -// failing to recognize sqrt as an intrinsic - #include <stdlib.h> #include <stdio.h> #include <math.h> diff --git a/gcc/testsuite/g++.dg/pph/p4pr36533.cc b/gcc/testsuite/g++.dg/pph/p4pr36533.cc index b230095..1fd03fa 100644 --- a/gcc/testsuite/g++.dg/pph/p4pr36533.cc +++ b/gcc/testsuite/g++.dg/pph/p4pr36533.cc @@ -1,6 +1,2 @@ /* { dg-options "-w -fpermissive" } */ -// pph asm xdiff 25347 -// xfail BOGUS INTRINSIC -// failing to recognise memset as an intrinsic - #include "p4pr36533.h" -- This patch is available for review at http://codereview.appspot.com/5276044