re PR c/86453 (error: type variant differs by TYPE_PACKED in free_lang_data since...
authorRichard Biener <rguenther@suse.de>
Thu, 12 Jul 2018 07:13:36 +0000 (07:13 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 12 Jul 2018 07:13:36 +0000 (07:13 +0000)
commitcd0762f3ca925ceaf69ae83442e08615fc1674e3
tree6929b0f9adbbe1835a3db9c1c962b36c3c168679
parent9e392989053729d4d50681e1742e2920d3b08ee4
re PR c/86453 (error: type variant differs by TYPE_PACKED in free_lang_data since r255469)

2018-07-12  Richard Biener  <rguenther@suse.de>

PR c/86453
* c-attribs.c (handle_packed_attribute): Do not build a variant
type with TYPE_PACKED, instead ignore the attribute if we may
not apply to the original type.

* g++.dg/warn/pr86453.C: New testcase.

From-SVN: r262575
gcc/c-family/ChangeLog
gcc/c-family/c-attribs.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/pr86453.C [new file with mode: 0644]