Skip to content
Snippets Groups Projects
Commit e397f852 authored by Jason Merrill's avatar Jason Merrill
Browse files

c++: #pragma target and deferred instantiation [PR115403]

My patch for 109753 applies the current #pragma target/optimize to a
function when we compile it, which was a problem for a template
instantiation deferred until EOF, where different #pragmas are active.  So
let's only do this for artificial functions.

	PR c++/115403
	PR c++/109753

gcc/cp/ChangeLog:

	* decl.cc (start_preparsed_function): Only call decl_attributes for
	artificial functions.

gcc/testsuite/ChangeLog:

	* g++.dg/ext/pragma-target1.C: New test.
parent 52383671
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment