From patchwork Fri Dec 2 17:23:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [committed] , Fix PR 51390 to make gcc.target/powerpc/recip-5.c run again X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 129776 Message-Id: <20111202172317.GA21647@ibm-tiger.the-meissners.org> To: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com Date: Fri, 2 Dec 2011 12:23:17 -0500 From: Michael Meissner List-Id: I committed this patch. It fixes a thinko I had in the builtin support that I committed on November 29th. I had used the wrong field for figuring out the attributes, and it meant that gcc.target/powerpc/recip-5.c started failing since __builtin_recipdiv and __builtin_recipdivf were not considered const functions if -ffast-math was used. 2011-12-02 Michael Meissner PR target/51390 * config/rs6000/rs6000.c (def_builtin): Use the correct field to figure out the function's attributes. (struct builtin_description): Mark mask field as const since we no longer need to modify it for SPE and PAIRED builtins. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 181929) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -215,10 +215,7 @@ static GTY(()) section *toc_section; struct builtin_description { - /* mask is not const because we're going to alter it below. This - nonsense will go away when we rewrite the -march infrastructure - to give us more target flag bits. */ - unsigned int mask; + const unsigned int mask; const enum insn_code icode; const char *const name; const enum rs6000_builtins code; @@ -9394,7 +9391,7 @@ static void def_builtin (const char *name, tree type, enum rs6000_builtins code) { tree t; - unsigned classify = rs6000_builtin_info[(int)code].mask; + unsigned classify = rs6000_builtin_info[(int)code].attr; const char *attr_string = ""; gcc_assert (name != NULL);