Hi!

I'd like to revert the r15-6448-gd09628742bb17719360ff447a8e604f5c6801bdf
reversion (of course without doing git revert of that because that breaks
ChangeLog generation) soon.

In order to do that and feel comfortable about that, I've performed
an x86_64-linux and i686-linux bootstrap/regtest with that the reversion
of that reversion and the following hack so that it triggers far more often.
We have right now only around 60 tests for #embed directly and even for the
automatic turning of larger comma separated sequences of 0-255 constants
into RAW_DATA_CST our testsuite doesn't test that too often.

So, the following hack allows to trigger that even for really small
sequences (from 4 up, so one INTEGER_CST first, then 2 element RAW_DATA_CST
and another INTEGER_CST last).

With these patches I got
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++11  at line 10 (test for errors, 
line 5)
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++11 (test for excess errors)
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++14  at line 10 (test for errors, 
line 5)
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++14 (test for excess errors)
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++17  at line 10 (test for errors, 
line 5)
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++17 (test for excess errors)
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++20  at line 10 (test for errors, 
line 5)
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++20 (test for excess errors)
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++23  at line 10 (test for errors, 
line 5)
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++23 (test for excess errors)
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++26  at line 10 (test for errors, 
line 5)
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++26 (test for excess errors)
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++98  at line 10 (test for errors, 
line 5)
+FAIL: c-c++-common/cpp/embed-10.c  -std=gnu++98 (test for excess errors)
+FAIL: g++.dg/cpp2a/class-deduction-aggr11.C  -std=c++20 (test for excess 
errors)
+FAIL: g++.dg/cpp2a/class-deduction-aggr11.C  -std=c++23 (test for excess 
errors)
+FAIL: g++.dg/cpp2a/class-deduction-aggr11.C  -std=c++26 (test for excess 
errors)
+FAIL: g++.dg/cpp2a/explicit1.C    (test for errors, line 48)
+FAIL: 25_algorithms/fill_n/constrained.cc  -std=gnu++20 (test for excess 
errors)
+UNRESOLVED: 25_algorithms/fill_n/constrained.cc  -std=gnu++20 compilation 
failed to produce executable
+FAIL: 25_algorithms/fill_n/constrained.cc  -std=gnu++26 (test for excess 
errors)
+UNRESOLVED: 25_algorithms/fill_n/constrained.cc  -std=gnu++26 compilation 
failed to produce executable
+FAIL: experimental/net/internet/address/v4/cons.cc  -std=gnu++17 (test for 
excess errors)
+UNRESOLVED: experimental/net/internet/address/v4/cons.cc  -std=gnu++17 
compilation failed to produce executable
+FAIL: experimental/net/internet/address/v4/creation.cc  -std=gnu++17 (test for 
excess errors)
+UNRESOLVED: experimental/net/internet/address/v4/creation.cc  -std=gnu++17 
compilation failed to produce executable
+FAIL: experimental/net/internet/address/v6/members.cc  -std=gnu++17 (test for 
excess errors)
+UNRESOLVED: experimental/net/internet/address/v6/members.cc  -std=gnu++17 
compilation failed to produce executable
+FAIL: experimental/net/internet/network/v4/cons.cc  -std=gnu++17 (test for 
excess errors)
+UNRESOLVED: experimental/net/internet/network/v4/cons.cc  -std=gnu++17 
compilation failed to produce executable
+FAIL: experimental/net/internet/network/v4/members.cc  -std=gnu++17 (test for 
excess errors)
+UNRESOLVED: experimental/net/internet/network/v4/members.cc  -std=gnu++17 
compilation failed to produce executable
+FAIL: experimental/net/internet/network/v6/cons.cc  -std=gnu++17 (test for 
excess errors)
+UNRESOLVED: experimental/net/internet/network/v6/cons.cc  -std=gnu++17 
compilation failed to produce executable
+FAIL: std/ranges/adaptors/all.cc  -std=gnu++20 (test for excess errors)
+UNRESOLVED: std/ranges/adaptors/all.cc  -std=gnu++20 compilation failed to 
produce executable
+FAIL: std/ranges/adaptors/all.cc  -std=gnu++26 (test for excess errors)
+UNRESOLVED: std/ranges/adaptors/all.cc  -std=gnu++26 compilation failed to 
produce executable
+FAIL: std/ranges/zip_transform/1.cc  -std=gnu++23 (test for excess errors)
+UNRESOLVED: std/ranges/zip_transform/1.cc  -std=gnu++23 compilation failed to 
produce executable
+FAIL: std/ranges/zip_transform/1.cc  -std=gnu++26 (test for excess errors)
+UNRESOLVED: std/ranges/zip_transform/1.cc  -std=gnu++26 compilation failed to 
produce executable
regressions and filed from that PR118528, PR118532 and PR118534 and will
post fixes for that momentarily.

Posting this patch mainly for archival purposes and so that I can refer to
it in the patches.

--- gcc/c/c-typeck.cc.jj        2024-12-19 21:46:13.585116197 +0100
+++ gcc/c/c-typeck.cc   2024-12-31 11:50:32.514734084 +0100
@@ -11690,7 +11690,7 @@ c_maybe_optimize_large_byte_initializer
   widest_int w = wi::to_widest (constructor_max_index);
   w -= wi::to_widest (constructor_index);
   w += 1;
-  if (w < 64)
+  if (w < 4)
     return 0;
   if (w > INT_MAX)
     return INT_MAX;
--- gcc/c/c-parser.cc.jj        2024-12-19 21:46:13.583116225 +0100
+++ gcc/c/c-parser.cc   2024-12-31 11:51:12.840167482 +0100
@@ -6689,9 +6689,9 @@ c_parser_initval (c_parser *parser, stru
       {
        char buf1[64];
        unsigned int i;
-       gcc_checking_assert (len >= 64);
+       gcc_checking_assert (len >= 4);
        location_t last_loc = UNKNOWN_LOCATION;
-       for (i = 0; i < 64; ++i)
+       for (i = 0; i < 4; ++i)
          {
            c_token *tok = c_parser_peek_nth_token_raw (parser, 1 + 2 * i);
            if (tok->type != CPP_COMMA)
@@ -6708,7 +6708,7 @@ c_parser_initval (c_parser *parser, stru
              loc = tok->location;
            last_loc = tok->location;
          }
-       if (i < 64)
+       if (i < 4)
          {
            vals_to_ignore = i;
            return;
--- gcc/cp/parser.cc.jj 2024-12-31 11:48:18.584615878 +0100
+++ gcc/cp/parser.cc    2024-12-31 11:49:07.689925922 +0100
@@ -739,7 +739,7 @@ cp_lexer_new_main (void)
   char *raw_data_buf = NULL;
   const unsigned int raw_data_max_len
     = 131072 - offsetof (struct tree_string, str) - 1;
-  const unsigned int raw_data_min_len = 128;
+  const unsigned int raw_data_min_len = 2;
 
   /* Get the remaining tokens from the preprocessor.  */
   while (tok->type != CPP_EOF)

        Jakub

Reply via email to