From b5087b28b09c84c69fa5e80021be026f297cb31d Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Sun, 26 Jul 2020 02:44:02 +0200 Subject: [PATCH] gcc.dg/torture/pr59330.c: Disable for mmix With the dejagnu status-wrapper, there's a reference to write in each executable, which for mmix in newlib has a reference to a variable defined in open, which for mmix in newlib has a reference to sprintf (oops!) and the dependency-chain goes on; ad finitum there's a reference to malloc, which in default newlib is colocated with free; the same file newlib/libc/stdlib/malloc.c. Not being compiled with -ffunction-sections, they're emitted in the same section (.text) and thus inseparable: you can't override just one of them as in this test, or else you'll get: /pre/mmix/bin/ld: /gccobj/mmix/./newlib/libc.a(lib_a-malloc.o): in function `free': /gcc/newlib/libc/stdlib/malloc.c:169: multiple definition of `free'; /tmp/ccvRA0zb.o:(.text+0x0): first defined here collect2: error: ld returned 1 exit status compiler exited with status 1 FAIL: gcc.dg/torture/pr59330.c -O0 (test for excess errors) I'm using a dg-skip-if here instead of starting a hardly scalable dg-do target selector. I'm not keying on effective-target unwrapped because the dependency-chain is target-specific rather than dejagnu status-wrapper-specific. gcc/testsuite: * gcc.dg/torture/pr59330.c: Disable for mmix. --- gcc/testsuite/gcc.dg/torture/pr59330.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.dg/torture/pr59330.c b/gcc/testsuite/gcc.dg/torture/pr59330.c index 74b832ea314..536171e0f18 100644 --- a/gcc/testsuite/gcc.dg/torture/pr59330.c +++ b/gcc/testsuite/gcc.dg/torture/pr59330.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "free inseparable from malloc when wrapped" { mmix-knuth-mmixware } } */ void free(void *ptr) { -- 2.30.2