From 0448240b88ceb5bb29d4872f434ddf385a30f1d2 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Fri, 23 Aug 2019 16:16:42 +0000 Subject: [PATCH] pr78973.c: Make functions static to avoid failures with -fpic gcc/testsuite/ChangeLog: * gcc.dg/pr78973.c: Make functions static to avoid failures with -fpic * gcc.dg/pr78973-2.c: Same. From-SVN: r274860 --- gcc/testsuite/ChangeLog | 2 ++ gcc/testsuite/gcc.dg/pr78973-2.c | 2 +- gcc/testsuite/gcc.dg/pr78973.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2bd6d62eae4..887496ee1a6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -3,6 +3,8 @@ * gcc.dg/Warray-bounds-36.c: Make functions static to avoid failures with -fpic. * gcc.dg/Warray-bounds-41.c: Same. + * gcc.dg/pr78973.c: Same. + * gcc.dg/pr78973-2.c: Same. 2019-08-22 Marek Polacek diff --git a/gcc/testsuite/gcc.dg/pr78973-2.c b/gcc/testsuite/gcc.dg/pr78973-2.c index 7cf9a9e0895..ad292092a80 100644 --- a/gcc/testsuite/gcc.dg/pr78973-2.c +++ b/gcc/testsuite/gcc.dg/pr78973-2.c @@ -10,7 +10,7 @@ void *p; -void f (int n) +static void f (int n) { if (n <= 4) p = __builtin_malloc (n); diff --git a/gcc/testsuite/gcc.dg/pr78973.c b/gcc/testsuite/gcc.dg/pr78973.c index 6c53f896233..d0ecba49810 100644 --- a/gcc/testsuite/gcc.dg/pr78973.c +++ b/gcc/testsuite/gcc.dg/pr78973.c @@ -6,7 +6,7 @@ { dg-do compile } { dg-options "-O2 -Wall" } */ -void f (void *p, int n) +static void f (void *p, int n) { if (n <= 4) __builtin_memset (p, 0, n); /* { dg-warning "exceeds maximum object size" "pr79073" { xfail ilp32 } } */ -- 2.30.2