[committed] libstdc++: Define foo() in optional/ref/access.cc test.

Message ID 20260404084024.31492-1-tkaminsk@redhat.com
State New
Headers
Series [committed] libstdc++: Define foo() in optional/ref/access.cc test. |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply

Commit Message

Tomasz Kaminski April 4, 2026, 8:40 a.m. UTC
  Fix undefined reference error when compiling with -O0.

libstdc++-v3/ChangeLog:

	* testsuite/20_util/optional/ref/access.cc: Provide
	definition for foo().
---
Pushed to trunk. Tested on x86_64-linux.

 libstdc++-v3/testsuite/20_util/optional/ref/access.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/libstdc++-v3/testsuite/20_util/optional/ref/access.cc b/libstdc++-v3/testsuite/20_util/optional/ref/access.cc
index 37c8ff355a6..dcd16a24b3c 100644
--- a/libstdc++-v3/testsuite/20_util/optional/ref/access.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/ref/access.cc
@@ -100,7 +100,7 @@  static_assert(  has_value_or_for<int(*)()> );
 int i;
 NonMovable nm;
 int arr[2];
-int foo();
+int foo() { return 1; }
 
 int main()
 {