c-common.c (check_cxx_fundamental_alignment_constraints): Check DECL_EXTERNAL.
authorJason Merrill <jason@redhat.com>
Thu, 15 Sep 2016 19:48:18 +0000 (15:48 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 15 Sep 2016 19:48:18 +0000 (15:48 -0400)
* c-common.c (check_cxx_fundamental_alignment_constraints): Check
DECL_EXTERNAL.

From-SVN: r240167

gcc/c-family/ChangeLog
gcc/c-family/c-common.c

index 3258816e3ed8a783f4bebebddfc7a257e88cde00..fa9b96140fd97e40119a0eddd2d7c43c9334474c 100644 (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
index 57b66712e3fdd955123cb7f0927fc7bb3d683d80..fc256867ec5fbe05191603400f53d81d4914fdc4 100644 (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;