===================================================================
@@ -0,0 +1,4 @@
+/* { dg-do compile { target arm*-*-eabi* } } */
+/* { dg-final { scan-assembler "\\.size\[\\t \]+static_foo, 4" } } */
+int foo;
+static int static_foo;
===================================================================
@@ -81,6 +81,8 @@
ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \
ASM_OUTPUT_LABEL (FILE, NAME); \
fprintf (FILE, "\t.space\t%d\n", SIZE ? (int)(SIZE) : 1); \
+ fprintf (FILE, "\t.size\t%s, %d\n", \
+ NAME, SIZE ? (int)(SIZE) : 1); \
} \
while (0)