diff options
author | Jakub Jelinek <jakub@redhat.com> | 2021-01-28 16:13:11 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2021-01-28 16:13:11 +0100 |
commit | 6bb207b468da36d9d99c63409dc4098514759c90 (patch) | |
tree | 79e00d8728b885a5a24f3c40c9697a3108810234 /gcc/go | |
parent | 8a8e515c2bf1a48117f463a949174c666932711b (diff) | |
download | gcc-6bb207b468da36d9d99c63409dc4098514759c90.zip gcc-6bb207b468da36d9d99c63409dc4098514759c90.tar.gz gcc-6bb207b468da36d9d99c63409dc4098514759c90.tar.bz2 |
c++: Fix up handling of register ... asm ("...") vars in templates [PR33661, PR98847]
As the testcase shows, for vars appearing in templates, we don't attach
the asm spec string to the pattern decls, nor pass it back to cp_finish_decl
during instantiation.
The following patch does that.
2021-01-28 Jakub Jelinek <jakub@redhat.com>
PR c++/33661
PR c++/98847
* decl.c (cp_finish_decl): For register vars with asmspec in templates
call set_user_assembler_name and set DECL_HARD_REGISTER.
* pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
pass asmspec_tree to cp_finish_decl.
* g++.target/i386/pr98847.C: New test.
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions