r274799 - in /trunk/gcc: cp/ChangeLog cp/decl.c...

rsandifo@gcc.gnu.org rsandifo@gcc.gnu.org
Wed Aug 21 13:59:00 GMT 2019


Author: rsandifo
Date: Wed Aug 21 13:59:31 2019
New Revision: 274799

URL: https://gcc.gnu.org/viewcvs?rev=274799&root=gcc&view=rev
Log:
[C++] Protect call to copy_attributes_to_builtin (PR91505)

copy_attributes_to_builtin only handles BUILT_IN_NORMAL, but C++ was
calling it immediately after the:

	  if (DECL_BUILT_IN_CLASS (newdecl) == BUILT_IN_NORMAL)

block.  The corresponding C code calls it inside the block instead.

2019-08-21  Richard Sandiford  <richard.sandiford@arm.com>

gcc/cp/
	PR c++/91505
	* decl.c (duplicate_decls): Call copy_attributes_to_builtin inside
	the BUILT_IN_NORMAL block rather than afterward.

gcc/testsuite/
	PR c++/91505
	* g++.target/i386/crc32-4.C: New test.

Added:
    trunk/gcc/testsuite/g++.target/i386/crc32-4.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list