Re: Several test failures due to "Introduce strub: machine-independent stack scrubbing"

2023-12-07 Thread Alexandre Oliva
On Dec  7, 2023, FX Coudert  wrote:

> The commit
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=f0a90c7d7333fc7f554b906245c84bdf04d716d7
> (Introduce strub: machine-independent stack scrubbing) has introduced
> many test failures on x86_64-apple-darwin21:

Nevermind, the followup patch I'd suggested won't help..  The problem is
that after the (expected) errors issued by strub mode pass for those
tests.  The passes that convert the function to SSA mode (and thus
provide the SSA pass property required by emutls) don't run, but emutls
doesn't have the same '&& !seen_error()' condition in its gate function,
so it tries to run, and finds that the required properties aren't there.

This patchlet should cure it.  Testing...

diff --git a/gcc/tree-emutls.cc b/gcc/tree-emutls.cc
index 5dca5a8291356..871e5a14f1e38 100644
--- a/gcc/tree-emutls.cc
+++ b/gcc/tree-emutls.cc
@@ -841,7 +841,7 @@ public:
   bool gate (function *) final override
 {
   /* If the target supports TLS natively, we need do nothing here.  */
-  return !targetm.have_tls;
+  return !targetm.have_tls && !seen_error ();
 }
 
   unsigned int execute (function *) final override

-- 
Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/
   Free Software Activist   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive


Re: Several test failures due to "Introduce strub: machine-independent stack scrubbing"

2023-12-07 Thread FX Coudert
> However, I'm very surprised that you're hitting this with the initial
> commit.  It's as if strub support was disabled on the target, but even
> if you were hitting this with e.g. offloading, only the followup commit
> introduced code to disable strub for such targets as nvptx.  Anyway, do
> you by any chance have any offloading enabled?

I may have misidentified the problem, my testing was done on:

LAST_UPDATED: Wed Dec 6 16:01:43 UTC 2023 (revision 458e7c93792)
https://gcc.gnu.org/pipermail/gcc-testresults/2023-December/802595.html

I’m restarting a build right now, will report back.

FX

Re: Several test failures due to "Introduce strub: machine-independent stack scrubbing"

2023-12-07 Thread Alexandre Oliva
On Dec  7, 2023, FX Coudert  wrote:

> The commit
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=f0a90c7d7333fc7f554b906245c84bdf04d716d7
> (Introduce strub: machine-independent stack scrubbing) has introduced
> many test failures on x86_64-apple-darwin21:

Please give the followup commit f908368d2cb50 a try, it should at least
silence the errors.  (but not fix the problem; I suppose we want
strubbing enabled on darwin)

However, I'm very surprised that you're hitting this with the initial
commit.  It's as if strub support was disabled on the target, but even
if you were hitting this with e.g. offloading, only the followup commit
introduced code to disable strub for such targets as nvptx.  Anyway, do
you by any chance have any offloading enabled?

I'll try to trigger this with a cross compiler.  Thanks,

-- 
Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/
   Free Software Activist   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive


Several test failures due to "Introduce strub: machine-independent stack scrubbing"

2023-12-07 Thread FX Coudert
Hi Alexandre,

The commit 
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=f0a90c7d7333fc7f554b906245c84bdf04d716d7
 (Introduce strub: machine-independent stack scrubbing) has introduced many 
test failures on x86_64-apple-darwin21:

+FAIL: c-c++-common/strub-apply2.c  -std=gnu++98 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++98 (test for excess errors)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++14 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++14 (test for excess errors)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++17 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++17 (test for excess errors)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++20 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++20 (test for excess errors)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++98 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++98 (test for excess errors)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++14 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++14 (test for excess errors)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++17 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++17 (test for excess errors)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++20 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++20 (test for excess errors)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++98 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++98 (test for excess errors)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++14 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++14 (test for excess errors)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++17 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++17 (test for excess errors)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++20 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++20 (test for excess errors)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++98 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++98 (test for excess errors)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++14 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++14 (test for excess errors)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++17 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++17 (test for excess errors)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++20 (internal compiler error: in 
verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++20 (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O0  (internal compiler error: 
in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O0  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O1  (internal compiler error: 
in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O1  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2  (internal compiler error: 
in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  (internal compiler 
error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  (test for excess 
errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O3 -g  (internal compiler 
error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O3 -g  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -Os  (internal compiler error: 
in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -Os  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2 -flto -flto-partition=none  
(internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2 -flto