Uninitialized global variables are put in the .bss section since the -fno-common
change, the attached patch prevents region-attribute-misuse.c failing if a .bss
section is in the assembler output.

Committed as obvious.
>From 89aa37dc3c71666d0ff05e96ea84e195d049a226 Mon Sep 17 00:00:00 2001
From: Jozef Lawrynowicz <joze...@mittosystems.com>
Date: Mon, 11 May 2020 16:58:11 +0100
Subject: [PATCH] MSP430: Allow .bss section to be created in
 region-attribute-misuse test

2020-05-12  Jozef Lawrynowicz  <joze...@mittosystems.com>

	* gcc.target/msp430/region-attribute-misuse.c: Allow a .bss section to
	be created.
---
 gcc/testsuite/ChangeLog                                   | 5 +++++
 gcc/testsuite/gcc.target/msp430/region-attribute-misuse.c | 1 -
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git gcc/testsuite/ChangeLog gcc/testsuite/ChangeLog
index 05952acab92..da776417bd5 100644
--- gcc/testsuite/ChangeLog
+++ gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-12  Jozef Lawrynowicz  <joze...@mittosystems.com>
+
+	* gcc.target/msp430/region-attribute-misuse.c: Allow a .bss section to
+	be created.
+
 2020-05-12  Martin Liska  <mli...@suse.cz>
 
 	PR sanitizer/95033
diff --git gcc/testsuite/gcc.target/msp430/region-attribute-misuse.c gcc/testsuite/gcc.target/msp430/region-attribute-misuse.c
index a108e274123..2b5107f0b8c 100644
--- gcc/testsuite/gcc.target/msp430/region-attribute-misuse.c
+++ gcc/testsuite/gcc.target/msp430/region-attribute-misuse.c
@@ -1,6 +1,5 @@
 /* { dg-do compile } */
 /* { dg-skip-if "" { *-*-* } { "-mcpu=msp430" "-mlarge" "-mcode-region=*" "-mdata-region=*" } { "" } } */
-/* { dg-final { scan-assembler-not ".section.*bss" } } */
 /* { dg-final { scan-assembler ".section.*upper.data" } } */
 /* { dg-final { scan-assembler ".section.*lower.data" } } */
 /* { dg-final { scan-assembler ".section.*either.data" } } */
-- 
2.17.1

Reply via email to