c-common.c (check_cxx_fundamental_alignment_constraints): Check DECL_EXTERNAL.

* c-common.c (check_cxx_fundamental_alignment_constraints): Check
	DECL_EXTERNAL.

From-SVN: r240167
This commit is contained in:
Jason Merrill 2016-09-15 15:48:18 -04:00 committed by Jason Merrill
parent 7e16ce79a4
commit 931388ce2d
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2016-09-15 Jason Merrill <jason@redhat.com>
* c-common.c (check_cxx_fundamental_alignment_constraints): Check
DECL_EXTERNAL.
2016-09-14 Jason Merrill <jason@redhat.com>
* c-common.c (check_cxx_fundamental_alignment_constraints): Don't

View File

@ -7870,7 +7870,7 @@ check_cxx_fundamental_alignment_constraints (tree node,
if (VAR_P (node))
{
if (TREE_STATIC (node))
if (TREE_STATIC (node) || DECL_EXTERNAL (node))
/* For file scope variables and static members, the target supports
alignments that are at most MAX_OFILE_ALIGNMENT. */
max_align = MAX_OFILE_ALIGNMENT;