crates/backtrace-sys2/src/libbacktrace/mtest.c in pf2-0.6.0 vs crates/backtrace-sys2/src/libbacktrace/mtest.c in pf2-0.7.0
- old
+ new
@@ -1,7 +1,7 @@
/* mtest.c -- Minidebug test for libbacktrace library
- Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
@@ -45,11 +45,11 @@
#include "backtrace.h"
#include "backtrace-supported.h"
#include "testlib.h"
-static int test1 (void) __attribute__ ((noinline, noclone, unused));
+static int test1 (void) __attribute__ ((noinline, noclone, optnone, unused));
static int f2 (int) __attribute__ ((noinline, noclone));
static int f3 (int, int) __attribute__ ((noinline, noclone));
/* Collected PC values. */
@@ -209,11 +209,11 @@
return failures;
}
/* Test the backtrace_simple function with non-inlined functions. */
-static int test3 (void) __attribute__ ((noinline, noclone, unused));
+static int test3 (void) __attribute__ ((noinline, noclone, optnone, unused));
static int f22 (int) __attribute__ ((noinline, noclone));
static int f23 (int, int) __attribute__ ((noinline, noclone));
static int
test3 (void)
@@ -371,10 +371,10 @@
"test5: unexpected syminfo value got %lx expected %lx\n",
(unsigned long) symdata.val,
(unsigned long) (uintptr_t) &global);
symdata.failed = 1;
}
- else if (symdata.size != sizeof (global))
+ else if (symdata.size != sizeof (global) && symdata.size != 0)
{
fprintf (stderr,
"test5: unexpected syminfo size got %lx expected %lx\n",
(unsigned long) symdata.size,
(unsigned long) sizeof (global));