From 931388ce2da09aefdf573cfd79d41111ccc79eb1 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 15 Sep 2016 15:48:18 -0400 Subject: [PATCH] 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 --- gcc/c-family/ChangeLog | 5 +++++ gcc/c-family/c-common.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 3258816e3ed..fa9b96140fd 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2016-09-15 Jason Merrill + + * c-common.c (check_cxx_fundamental_alignment_constraints): Check + DECL_EXTERNAL. + 2016-09-14 Jason Merrill * c-common.c (check_cxx_fundamental_alignment_constraints): Don't diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 57b66712e3f..fc256867ec5 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -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;