https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120061

--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
14 version:

--- gcc/testsuite/gcc.dg/plugin/plugin.exp.jj   2024-04-26 11:46:58.650218626
+0200
+++ gcc/testsuite/gcc.dg/plugin/plugin.exp      2025-05-06 10:01:10.543208267
+0200
@@ -126,7 +126,9 @@ set plugin_test_list [list \
     { location_overflow_plugin.c \
          location-overflow-test-1.c \
          location-overflow-test-2.c \
-         location-overflow-test-pr83173.c } \
+         location-overflow-test-pr83173.c \
+         location-overflow-test-pr116047.c \
+         location-overflow-test-pr120061.c } \
     { must_tail_call_plugin.c \
          must-tail-call-1.c \
          must-tail-call-2.c } \
--- gcc/testsuite/gcc.dg/plugin/location_overflow_plugin.c.jj   2024-04-26
11:46:58.650218626 +0200
+++ gcc/testsuite/gcc.dg/plugin/location_overflow_plugin.c      2025-05-06
10:01:23.602029841 +0200
@@ -101,7 +101,7 @@ plugin_init (struct plugin_name_args *pl
       break;

     default:
-      error_at (UNKNOWN_LOCATION, "unrecognized value for plugin argument");
+      break;
     }

   return 0;
--- gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047.c.jj   
2025-05-06 08:56:14.311445940 +0200
+++ gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047.c      
2025-05-06 09:52:37.909212363 +0200
@@ -0,0 +1,5 @@
+/* PR preprocessor/116047 */
+/* { dg-do preprocess } */
+/* { dg-options "-nostdinc -std=c23
-fplugin-arg-location_overflow_plugin-value=0x4fff8080" } */
+#include "location-overflow-test-pr116047-1.h"
+/* { dg-final { scan-file location-overflow-test-pr116047.i
"static_assert\[^\n\r]\*6\[^\n\r]\*== 6" } } */
--- gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-1.h.jj 
2025-05-06 08:57:39.624279475 +0200
+++ gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-1.h    
2025-05-06 09:47:57.586042403 +0200
@@ -0,0 +1,6 @@
+
+
+
+
+#include "location-overflow-test-pr116047-2.h"
+static_assert (__LINE__ == 6, "");
--- gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-2.h.jj 
2025-05-06 08:57:52.869098384 +0200
+++ gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-2.h    
2025-05-05 12:27:34.907854863 +0200
@@ -0,0 +1 @@
+int i;
--- gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061.c.jj   
2025-05-06 09:49:58.153395094 +0200
+++ gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061.c      
2025-05-06 09:55:41.382705568 +0200
@@ -0,0 +1,6 @@
+/* PR preprocessor/120061 */
+/* { dg-do preprocess } */
+/* { dg-options "-nostdinc -std=c23
-fplugin-arg-location_overflow_plugin-value=0x61000000" } */
+#include "location-overflow-test-pr120061-1.h"
+static_assert (__LINE__ == 5, "");
+/* { dg-final { scan-file location-overflow-test-pr120061.i
"static_assert\[^\n\r]\*5\[^\n\r]\*== 5" } } */
--- gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-1.h.jj 
2025-05-06 08:57:39.624279475 +0200
+++ gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-1.h    
2025-05-06 09:55:48.417609451 +0200
@@ -0,0 +1,6 @@
+
+
+
+
+#include "location-overflow-test-pr120061-2.h"
+
--- gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-2.h.jj 
2025-05-06 08:57:52.869098384 +0200
+++ gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-2.h    
2025-05-05 12:27:34.907854863 +0200
@@ -0,0 +1 @@
+int i;

WIth pre- r14-11679 I get on make check-gcc RUNTESTFLAGS=plugin.exp
Running /usr/src/gcc-14/gcc/testsuite/gcc.dg/plugin/plugin.exp ...
FAIL: gcc.dg/plugin/location-overflow-test-pr116047.c
-fplugin=./location_overflow_plugin.so  scan-file
static_assert[^\n\r]*6[^\n\r]*== 6

                === gcc Summary ===

# of expected passes            916
# of unexpected failures        1
# of expected failures          11
# of unsupported tests          4
and with current gcc 14 branch
Running /usr/src/gcc-14/gcc/testsuite/gcc.dg/plugin/plugin.exp ...
FAIL: gcc.dg/plugin/location-overflow-test-pr120061.c
-fplugin=./location_overflow_plugin.so  scan-file
static_assert[^\n\r]*5[^\n\r]*== 5

                === gcc Summary ===

# of expected passes            916
# of unexpected failures        1
# of expected failures          11
# of unsupported tests          4
and with patched 14 branch
Running /usr/src/gcc-14/gcc/testsuite/gcc.dg/plugin/plugin.exp ...

                === gcc Summary ===

# of expected passes            917
# of expected failures          11
# of unsupported tests          4

Now to port the test to trunk with 64-bit location_t...

Reply via email to