Re: [PATCH] c++/modules: Ensure deduction guides are always reachable [PR115231]

2024-06-15 Thread Nathaniel Shead
On Sun, Jun 16, 2024 at 12:29:23PM +1000, Nathaniel Shead wrote:
> Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk?
> 
> This probably isn't the most efficient approach, since we need to do
> name lookup to find deduction guides for a type which will also
> potentially do a bunch of pointless lazy loading from imported modules,
> but I wasn't able to work out a better approach without completely
> reworking how deduction guides are stored and represented.  This way at
> least is correct (I believe), and we can maybe revisit this in the
> future.
> 
> -- >8 --
> 
> Deduction guides are represented as 'normal' functions currently, and
> have no special handling in modules.  However, this causes some issues;
> by [temp.deduct.guide] a deduction guide is not found by normal name
> lookup and instead all reachable deduction guides for a class template
> should be considered, but this does not happen currently.
> 
> To solve this, this patch ensures that all deduction guides are
> considered exported to ensure that they are always visible to importers
> if they are reachable.  Another alternative here would be to add a new
> kind of "all reachable" flag to name lookup, but that is complicated by
> some difficulties in handling GM entities; this may be a better way to
> go if more kinds of entities end up needing this handling, however.
> 
> Another issue here is that because deduction guides are "unrelated"
> functions, they will usually get discarded from the GMF, so this patch
> ensures that when finding dependencies, GMF deduction guides will also
> have bindings created.  We do this in find_dependencies so that we don't
> unnecessarily create bindings for GMF deduction guides that are never
> reached; for consistency we do this for *all* deduction guides, not just
> GM ones.
> 
> Finally, when merging deduction guides from multiple modules, the name
> lookup code may now return two-dimensional overload sets, so update
> callers to match.
> 
> As a small drive-by improvement this patch also updates the error pretty
> printing code to add a space before the '->' when printing a deduction
> guide, so we get 'S(int) -> S' instead of 'S(int)-> S'.
> 
>   PR c++/115231
> 
> gcc/cp/ChangeLog:
> 
>   * error.cc (dump_function_decl): Add a space before '->' when
>   printing deduction guides.
>   * module.cc (depset::hash::add_binding_entity): Skip deduction
>   guides here.
>   (depset::hash::add_deduction_guides): New.
>   (depset::hash::find_dependencies): Add deduction guide
>   dependencies for a class template.
>   (module_state::write_cluster): Always consider deduction guides
>   as exported.
>   * pt.cc (deduction_guides_for): Use 'lkp_iterator' instead of
>   'ovl_iterator'.
> 
> gcc/testsuite/ChangeLog:
> 
>   * g++.dg/modules/dguide-1_a.C: New test.
>   * g++.dg/modules/dguide-1_b.C: New test.
>   * g++.dg/modules/dguide-2_a.C: New test.
>   * g++.dg/modules/dguide-2_b.C: New test.
>   * g++.dg/modules/dguide-3_a.C: New test.
>   * g++.dg/modules/dguide-3_b.C: New test.
>   * g++.dg/modules/dguide-3_c.C: New test.
> 
> Signed-off-by: Nathaniel Shead 
> ---
>  gcc/cp/error.cc   |  1 +
>  gcc/cp/module.cc  | 60 +++
>  gcc/cp/pt.cc  |  2 +-
>  gcc/testsuite/g++.dg/modules/dguide-1_a.C | 44 +
>  gcc/testsuite/g++.dg/modules/dguide-1_b.C | 20 
>  gcc/testsuite/g++.dg/modules/dguide-2_a.C | 24 +
>  gcc/testsuite/g++.dg/modules/dguide-2_b.C | 19 +++
>  gcc/testsuite/g++.dg/modules/dguide-3_a.C | 10 
>  gcc/testsuite/g++.dg/modules/dguide-3_b.C | 10 
>  gcc/testsuite/g++.dg/modules/dguide-3_c.C | 22 +
>  10 files changed, 211 insertions(+), 1 deletion(-)
>  create mode 100644 gcc/testsuite/g++.dg/modules/dguide-1_a.C
>  create mode 100644 gcc/testsuite/g++.dg/modules/dguide-1_b.C
>  create mode 100644 gcc/testsuite/g++.dg/modules/dguide-2_a.C
>  create mode 100644 gcc/testsuite/g++.dg/modules/dguide-2_b.C
>  create mode 100644 gcc/testsuite/g++.dg/modules/dguide-3_a.C
>  create mode 100644 gcc/testsuite/g++.dg/modules/dguide-3_b.C
>  create mode 100644 gcc/testsuite/g++.dg/modules/dguide-3_c.C
> 
> diff --git a/gcc/cp/error.cc b/gcc/cp/error.cc
> index 171a352c85f..2fb5084320e 100644
> --- a/gcc/cp/error.cc
> +++ b/gcc/cp/error.cc
> @@ -1866,6 +1866,7 @@ dump_function_decl (cxx_pretty_printer *pp, tree t, int 
> flags)
>   dump_type_suffix (pp, ret, flags);
>else if (deduction_guide_p (t))
>   {
> +   pp->set_padding (pp_before);
> pp_cxx_ws_string (pp, "->");
> dump_type (pp, TREE_TYPE (TREE_TYPE (t)), flags);
>   }
> diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
> index 6d6044af199..a2c9e151fd5 100644
> --- a/gcc/cp/module.cc
> +++ b/gcc/cp/module.cc
> @@ -2589,6 +2589,9 @@ public:
>  void add_partial_entities (vec *);
>  

[PATCH v5] gcc, libcpp: Add warning switch for "#pragma once in main file" [PR89808]

2024-06-15 Thread Ken Matsui
This patch adds a warning switch for "#pragma once in main file".  The
warning option name is Wpragma-once-outside-header, which is the same
as Clang provides.

PR preprocessor/89808

gcc/c-family/ChangeLog:

* c.opt (Wpragma_once_outside_header): Define new option.
* c.opt.urls: Regenerate.

gcc/ChangeLog:

* doc/invoke.texi (Warning Options): Document
-Wno-pragma-once-outside-header.

libcpp/ChangeLog:

* include/cpplib.h (cpp_warning_reason): Define
CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER.
* directives.cc (do_pragma_once): Use
CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER.

gcc/testsuite/ChangeLog:

* g++.dg/warn/Wno-pragma-once-outside-header.C: New test.
* g++.dg/warn/Wpragma-once-outside-header.C: New test.

Signed-off-by: Ken Matsui 
---
 gcc/c-family/c.opt |  4 
 gcc/c-family/c.opt.urls|  3 +++
 gcc/doc/invoke.texi| 10 --
 .../g++.dg/warn/Wno-pragma-once-outside-header.C   |  5 +
 .../g++.dg/warn/Wpragma-once-outside-header.C  |  6 ++
 libcpp/directives.cc   |  3 ++-
 libcpp/include/cpplib.h|  3 ++-
 7 files changed, 30 insertions(+), 4 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/warn/Wno-pragma-once-outside-header.C
 create mode 100644 gcc/testsuite/g++.dg/warn/Wpragma-once-outside-header.C

diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 403abc1f26e..3439f36fe45 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1188,6 +1188,10 @@ Wpragmas
 C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning
 Warn about misuses of pragmas.
 
+Wpragma-once-outside-header
+C ObjC C++ ObjC++ Var(warn_pragma_once_outside_header) 
CppReason(CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER) Init(1) Warning
+Warn about #pragma once outside of a header.
+
 Wprio-ctor-dtor
 C ObjC C++ ObjC++ Var(warn_prio_ctor_dtor) Init(1) Warning
 Warn if constructor or destructors with priorities from 0 to 100 are used.
diff --git a/gcc/c-family/c.opt.urls b/gcc/c-family/c.opt.urls
index dd455d7c0dc..778ca08be2e 100644
--- a/gcc/c-family/c.opt.urls
+++ b/gcc/c-family/c.opt.urls
@@ -672,6 +672,9 @@ 
UrlSuffix(gcc/Warning-Options.html#index-Wno-pointer-to-int-cast)
 Wpragmas
 UrlSuffix(gcc/Warning-Options.html#index-Wno-pragmas)
 
+Wpragma-once-outside-header
+UrlSuffix(gcc/Warning-Options.html#index-Wno-pragma-once-outside-header)
+
 Wprio-ctor-dtor
 UrlSuffix(gcc/Warning-Options.html#index-Wno-prio-ctor-dtor)
 
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 9456ced468a..c7f17ca9eb7 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -391,8 +391,8 @@ Objective-C and Objective-C++ Dialects}.
 -Wpacked  -Wno-packed-bitfield-compat  -Wpacked-not-aligned  -Wpadded
 -Wparentheses  -Wno-pedantic-ms-format
 -Wpointer-arith  -Wno-pointer-compare  -Wno-pointer-to-int-cast
--Wno-pragmas  -Wno-prio-ctor-dtor  -Wredundant-decls
--Wrestrict  -Wno-return-local-addr  -Wreturn-type
+-Wno-pragmas  -Wno-pragma-once-outside-header  -Wno-prio-ctor-dtor
+-Wredundant-decls  -Wrestrict  -Wno-return-local-addr  -Wreturn-type
 -Wno-scalar-storage-order  -Wsequence-point
 -Wshadow  -Wshadow=global  -Wshadow=local  -Wshadow=compatible-local
 -Wno-shadow-ivar
@@ -7983,6 +7983,12 @@ Do not warn about misuses of pragmas, such as incorrect 
parameters,
 invalid syntax, or conflicts between pragmas.  See also
 @option{-Wunknown-pragmas}.
 
+@opindex Wno-pragma-once-outside-header
+@opindex Wpragma-once-outside-header
+@item -Wno-pragma-once-outside-header
+Do not warn when @code{#pragma once} is used in a file that is not a header
+file, such as a main file.
+
 @opindex Wno-prio-ctor-dtor
 @opindex Wprio-ctor-dtor
 @item -Wno-prio-ctor-dtor
diff --git a/gcc/testsuite/g++.dg/warn/Wno-pragma-once-outside-header.C 
b/gcc/testsuite/g++.dg/warn/Wno-pragma-once-outside-header.C
new file mode 100644
index 000..b5be4d25a9d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wno-pragma-once-outside-header.C
@@ -0,0 +1,5 @@
+// { dg-do assemble  }
+// { dg-options "-Wno-pragma-once-outside-header" }
+
+#pragma once
+int main() {}
diff --git a/gcc/testsuite/g++.dg/warn/Wpragma-once-outside-header.C 
b/gcc/testsuite/g++.dg/warn/Wpragma-once-outside-header.C
new file mode 100644
index 000..29f09b69f71
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wpragma-once-outside-header.C
@@ -0,0 +1,6 @@
+// { dg-do assemble  }
+// { dg-options "-Werror=pragma-once-outside-header" }
+// { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 }
+
+#pragma once  // { dg-error "'pragma once' in main file" }
+int main() {}
diff --git a/libcpp/directives.cc b/libcpp/directives.cc
index 479f8c716e8..467efdf637d 100644
--- a/libcpp/directives.cc
+++ b/libcpp/directives.cc
@@ -1589,7 +1589,8 @@ static void
 do_pragma_once (cpp_reader *pfile)
 {
   if 

Results for 15.0.0 20240616 (experimental) [remotes/origin/master r15-1356-gbc630d613db] (GCC) testsuite on pru-unknown-elf

2024-06-15 Thread The GnuPru BuildBot via Gcc-testresults
LAST_UPDATED: Sun Jun 16 03:21:40 UTC 2024 (revision r15-1356-gbc630d613db)

Target is pru-unknown-elf
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target pru-sim
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c (test for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c 2 blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c expected multiline 
pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c (test for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c 2 blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c expected multiline 
pattern lines 19-34
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c (test for excess errors)
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c 2 blank line(s) in output
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c expected multiline pattern 
lines 13-28
FAIL: c-c++-common/pr103798-2.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-3.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-4.c  -Wc++-compat   scan-assembler-not memchr
FAIL: gcc.dg/20141029-1.c scan-rtl-dump-times final "mem/v(/.)*:HI" 4
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for short (test for 
warnings, line 51)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for signed char (test for 
warnings, line 50)
FAIL: gcc.dg/c23-nullptr-1.c (test for excess errors)
UNRESOLVED: gcc.dg/c23-nullptr-1.c compilation failed to produce executable
FAIL: gcc.dg/gnu23-tag-composite-1.c  (test for errors, line 43)
FAIL: gcc.dg/gnu23-tag-composite-1.c (test for excess errors)
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/pr100927.c scan-rtl-dump-times final "(?n)^[ t]*(fix:SI" 3
FAIL: gcc.dg/pr110279-1.c scan-tree-dump-times widening_mul "Generated FMA" 3
FAIL: gcc.dg/pr23623.c scan-rtl-dump-times final "mem/v(/.)*:SI" 12
FAIL: gcc.dg/pr82929-2.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/pr82929.c scan-tree-dump-times store-merging "Merging successful" 1
FAIL: gcc.dg/pr84877.c execution test
FAIL: gcc.dg/store_merging_1.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_10.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_11.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_13.c scan-tree-dump-times store-merging "Merging 
successful" 13
FAIL: gcc.dg/store_merging_14.c scan-tree-dump-times store-merging "Merging 
successful" 9
FAIL: gcc.dg/store_merging_15.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_2.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_20.c scan-tree-dump-times store-merging "Merging 
successful" 3
FAIL: gcc.dg/store_merging_21.c scan-tree-dump-times store-merging "Merging 
successful" 4
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "New 
sequence of 1 stores to replace old one of 3 stores" 1
FAIL: gcc.dg/store_merging_26.c scan-tree-dump store-merging "New sequence of 1 
stores to replace old one of 2 stores"
FAIL: gcc.dg/store_merging_27.c scan-tree-dump store-merging "New sequence of 
[12] stores to replace old one of 3 stores"
FAIL: gcc.dg/store_merging_28.c scan-tree-dump-times store-merging "New 
sequence of [24] stores to replace old one of 6 stores" 1
FAIL: gcc.dg/store_merging_29.c scan-tree-dump store-merging "New sequence of 3 
stores to replace old one of 6 stores"
FAIL: gcc.dg/store_merging_4.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "MEM 
 [.*]" 1
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_7.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_8.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_9.c scan-tree-dump-times store-merging "Merging 
successful" 2
WARNING: gcc.dg/torture/pr112305.c   -O0  execution test program timed out.
FAIL: gcc.dg/torture/pr112305.c   -O0  execution test
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  [(char *)] = "
FAIL: gcc.dg/tree-ssa/if-to-switch-1.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/if-to-switch-10.c scan-tree-dump iftoswitch "Condition 

Results for 15.0.0 20240616 (experimental) [master r15-1356-gbc630d613db] (GCC) testsuite on i686-pc-linux-gnu

2024-06-15 Thread haochenj via Gcc-testresults
LAST_UPDATED: Sun Jun 16 01:55:08 UTC 2024 (revision r15-1356-gbc630d613db)

Native configuration is i686-pc-linux-gnu

=== gcc tests ===


Running target unix
UNRESOLVED: gcc.c-torture/compile/2009-1.c   -O0 
UNRESOLVED: gcc.c-torture/compile/2009-1.c   -O1 
UNRESOLVED: gcc.c-torture/compile/2009-1.c   -O2 
UNRESOLVED: gcc.c-torture/compile/2009-1.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none 
UNRESOLVED: gcc.c-torture/compile/2009-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects 
UNRESOLVED: gcc.c-torture/compile/2009-1.c   -O3 -g 
UNRESOLVED: gcc.c-torture/compile/2009-1.c   -Os 
UNRESOLVED: gcc.c-torture/compile/2009-2.c   -O0 
UNRESOLVED: gcc.c-torture/compile/2009-2.c   -O1 
UNRESOLVED: gcc.c-torture/compile/2009-2.c   -O2 
UNRESOLVED: gcc.c-torture/compile/2009-2.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none 
UNRESOLVED: gcc.c-torture/compile/2009-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects 
UNRESOLVED: gcc.c-torture/compile/2009-2.c   -O3 -g 
UNRESOLVED: gcc.c-torture/compile/2009-2.c   -Os 
UNRESOLVED: gcc.c-torture/compile/981001-2.c   -O0 
UNRESOLVED: gcc.c-torture/compile/981001-2.c   -O1 
UNRESOLVED: gcc.c-torture/compile/981001-2.c   -O2 
UNRESOLVED: gcc.c-torture/compile/981001-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none 
UNRESOLVED: gcc.c-torture/compile/981001-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects 
UNRESOLVED: gcc.c-torture/compile/981001-2.c   -O3 -g 
UNRESOLVED: gcc.c-torture/compile/981001-2.c   -Os 
UNRESOLVED: gcc.c-torture/compile/pr61159.c   -O0 
UNRESOLVED: gcc.c-torture/compile/pr61159.c   -O1 
UNRESOLVED: gcc.c-torture/compile/pr61159.c   -O2 
UNRESOLVED: gcc.c-torture/compile/pr61159.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none 
UNRESOLVED: gcc.c-torture/compile/pr61159.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects 
UNRESOLVED: gcc.c-torture/compile/pr61159.c   -O3 -g 
UNRESOLVED: gcc.c-torture/compile/pr61159.c   -Os 
UNRESOLVED: gcc.c-torture/execute/20030125-1.c   -O0 
UNRESOLVED: gcc.c-torture/execute/20030125-1.c   -O1 
UNRESOLVED: gcc.c-torture/execute/20030125-1.c   -O2 
UNRESOLVED: gcc.c-torture/execute/20030125-1.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none 
UNRESOLVED: gcc.c-torture/execute/20030125-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects 
UNRESOLVED: gcc.c-torture/execute/20030125-1.c   -O3 -g 
UNRESOLVED: gcc.c-torture/execute/20030125-1.c   -Os 
FAIL: gcc.dg/debug/dwarf2/asm-line1.c scan-assembler is_stmt 1
FAIL: gcc.dg/debug/dwarf2/discriminator.c scan-assembler loc [0-9] 11 [0-9]( 
is_stmt [0-9])? discriminator 1\\n
FAIL: gcc.dg/debug/dwarf2/discriminator.c scan-assembler loc [0-9] 11 [0-9]( 
is_stmt [0-9])? discriminator 2\\n
FAIL: gcc.dg/debug/dwarf2/discriminator.c scan-assembler loc [0-9] 11 [0-9]( 
is_stmt [0-9])?\\n
UNRESOLVED: c-c++-common/Waddress-5.c  -Wc++-compat 
UNRESOLVED: gcc.dg/Walways-true-2.c
FAIL: gcc.dg/Wstringop-overflow-14.c (test for excess errors)
FAIL: gcc.dg/Wstringop-overflow-14.c pr102706 (test for warnings, line 40)
UNRESOLVED: gcc.dg/attr-copy-6.c
UNRESOLVED: gcc.dg/attr-weak-hidden-1.c
UNRESOLVED: gcc.dg/attr-weak-hidden-1a.c
UNRESOLVED: gcc.dg/attr-weakref-1-darwin.c
UNRESOLVED: gcc.dg/attr-weakref-1.c
UNRESOLVED: gcc.dg/attr-weakref-2.c
UNRESOLVED: gcc.dg/attr-weakref-3.c
UNRESOLVED: gcc.dg/attr-weakref-4.c
UNRESOLVED: gcc.dg/darwin-weakimport-1.c
UNRESOLVED: gcc.dg/darwin-weakimport-2.c
UNRESOLVED: gcc.dg/darwin-weakimport-3.c
UNRESOLVED: gcc.dg/darwin-weakref-1.c
UNRESOLVED: gcc.dg/pr77587.c
UNRESOLVED: gcc.dg/pr77587a.c
UNRESOLVED: gcc.dg/pr84739.c
FAIL: gcc.dg/pr90263.c scan-assembler mempcpy
FAIL: gcc.dg/pr96573.c scan-tree-dump optimized 
"__builtin_bswap|VEC_PERM_EXPR[^\\n\\r]*7, 6, 5, 4, 3, 2, 1, 0"
UNRESOLVED: gcc.dg/visibility-21.c
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: gcc.dg/visibility-d.c scan-not-hidden 
FAIL: 

[Bug tree-optimization/115508] [14/15 regression] ICE when building flac with -O2 -march=znver1

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508

Andrew Pinski  changed:

   What|Removed |Added

  Attachment #58443|0   |1
is obsolete||

--- Comment #11 from Andrew Pinski  ---
Created attachment 58444
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58444=edit
Fails now without -m32

[Bug rtl-optimization/114515] [15 Regression] Failure to use aarch64 lane forms after PR101523

2024-06-15 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114515

Jeffrey A. Law  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=114996

--- Comment #12 from Jeffrey A. Law  ---
Reading the RTL dumps from Richard S. this looks like the exact same problem
we're still seeing on the RISC-V port, affecting 557.xz.

Specifically we get the same I2 back, but I3 has changed.  The change in I3 in
turn allows I2 to combine into a different instruction and net is a clear
improvement.  ISTM that allowing this combination when we get the same I2 back,
but a different I3 would be sufficient to fix both the aarch64 and riscv
problems.

Unfortunately Segher has gone radio silent on this issue.

[Bug tree-optimization/115508] [14/15 regression] ICE when building flac with -O2 -march=znver1

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508

Andrew Pinski  changed:

   What|Removed |Added

  Attachment #58442|0   |1
is obsolete||

--- Comment #10 from Andrew Pinski  ---
Created attachment 58443
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58443=edit
A little more reduced

Slightly more reduced. Still trying to figure out the SLP thing here.

Regressions on master at commit r15-1356 vs commit r15-1347 on Linux/x86_64

2024-06-15 Thread Haochen Jiang via Gcc-regression
Regressions on master at commit r15-1356 vs commit r15-1347 on Linux/x86_64
New failures:

New passes:
FAIL: 30_threads/async/async.cc  -std=gnu++17 execution test


Results for 15.0.0 20240616 (experimental) [master r15-1356-gbc630d613db] (GCC) testsuite on x86_64-pc-linux-gnu

2024-06-15 Thread haochenj--- via Gcc-testresults
LAST_UPDATED: Sun Jun 16 01:55:10 UTC 2024 (revision r15-1356-gbc630d613db)

Native configuration is x86_64-pc-linux-gnu

=== gcc tests ===


Running target unix
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -Os  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/inline-params.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
XPASS: gcc.dg/guality/inline-params.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg7 == 30
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg7 == 30
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg1 
== 1
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg2 
== 2
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg3 
== 3
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg4 
== 4
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg5 
== 5
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg6 
== 6
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg7 
== 30
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 arg1 
== 1
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 arg2 
== 2
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 arg3 
== 3
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 arg4 
== 4
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 arg5 
== 5
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 arg6 
== 6
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 arg7 
== 30
FAIL: gcc.dg/guality/pr36728-4.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 14 y == 2
FAIL: gcc.dg/guality/pr36728-4.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  

[Bug tree-optimization/115508] [14/15 regression] ICE when building flac with -O2 -march=znver1

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508

--- Comment #9 from Andrew Pinski  ---
  _19 = BIT_FIELD_REF ;
  _12 = BIT_FIELD_REF ;
  _15 = _12 | _19;

vs
  _13 = BIT_FIELD_REF ;
  _14 = BIT_FIELD_REF ;
  _15 = _13 | _14;

So basically it is just by accident the order happens that way which is why the
reducing it further removing the stuff afterwards does not make any difference
...

Results for 13.3.1 20240616 [remotes/origin/releases/gcc-13 r13-8851-g663be6b995f] (GCC) testsuite on pru-unknown-elf

2024-06-15 Thread The GnuPru BuildBot via Gcc-testresults
LAST_UPDATED: Sun Jun 16 02:59:17 UTC 2024 (revision r13-8851-g663be6b995f)

Target is pru-unknown-elf
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target pru-sim
FAIL: c-c++-common/pr103798-2.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-3.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-4.c  -Wc++-compat   scan-assembler-not memchr
FAIL: gcc.dg/20141029-1.c scan-rtl-dump-times final "mem/v(/.)*:HI" 4
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for short (test for 
warnings, line 51)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for signed char (test for 
warnings, line 50)
FAIL: gcc.dg/c2x-nullptr-1.c (test for excess errors)
UNRESOLVED: gcc.dg/c2x-nullptr-1.c compilation failed to produce executable
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/pr23623.c scan-rtl-dump-times final "mem/v(/.)*:SI" 12
FAIL: gcc.dg/pr82929-2.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/pr82929.c scan-tree-dump-times store-merging "Merging successful" 1
FAIL: gcc.dg/pr84877.c execution test
FAIL: gcc.dg/store_merging_1.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_10.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_11.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_13.c scan-tree-dump-times store-merging "Merging 
successful" 13
FAIL: gcc.dg/store_merging_14.c scan-tree-dump-times store-merging "Merging 
successful" 9
FAIL: gcc.dg/store_merging_15.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_2.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_20.c scan-tree-dump-times store-merging "Merging 
successful" 3
FAIL: gcc.dg/store_merging_21.c scan-tree-dump-times store-merging "Merging 
successful" 4
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "New 
sequence of 1 stores to replace old one of 3 stores" 1
FAIL: gcc.dg/store_merging_26.c scan-tree-dump store-merging "New sequence of 1 
stores to replace old one of 2 stores"
FAIL: gcc.dg/store_merging_27.c scan-tree-dump store-merging "New sequence of 
[12] stores to replace old one of 3 stores"
FAIL: gcc.dg/store_merging_28.c scan-tree-dump-times store-merging "New 
sequence of [24] stores to replace old one of 6 stores" 1
FAIL: gcc.dg/store_merging_29.c scan-tree-dump store-merging "New sequence of 3 
stores to replace old one of 6 stores"
FAIL: gcc.dg/store_merging_4.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "MEM 
 [.*]" 1
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_7.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_8.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_9.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/uninit-pred-9_b.c bogus warning (test for bogus messages, line 20)
FAIL: gcc.dg/tree-ssa/ctz-char.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-char.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-int.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-long.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-int.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-long.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  [(char *)] = "
FAIL: gcc.dg/tree-ssa/if-to-switch-1.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/if-to-switch-10.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/if-to-switch-3.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/if-to-switch-9.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/ssa-dom-thread-7.c scan-tree-dump thread2 "Jumps 
threaded: 9"
FAIL: outputs-22 exe savetmp namedb-2: outputs.ld1_args
FAIL: 

[gcc r15-1357] [committed] Fix minor SH scan-asm failure after recent IOR->ADD changes

2024-06-15 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:0240909cb03f2a37a74364b00e51ad782c748551

commit r15-1357-g0240909cb03f2a37a74364b00e51ad782c748551
Author: Jeff Law 
Date:   Sat Jun 15 21:17:10 2024 -0600

[committed] Fix minor SH scan-asm failure after recent IOR->ADD changes

This fixes minor fallout from the IOR->ADD change for rotates that I 
installed
a little while ago.

Basically the SH backend has a special pattern for setting the T register 
that
has elements similar to a rotate.  With the IOR->ADD change that pattern no
longer matches and we get scan-asm failures.

Fixing isn't a trivial case of just replacing IOR with ADD as the IOR->ADD
change changes some of the simplifications/canonicalizations along the way.

The net is we need a pattern with a slightly different structure.   I've
regression tested this on sh3[eb]-linux-gnu and bootstrapped sh4-linux-gnu
(without a regression test).

gcc/
* config/sh/sh.md (neg_zero_extract_4b): New pattern.

Diff:
---
 gcc/config/sh/sh.md | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 19481c07db6a..92a1efeb811f 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -10093,6 +10093,25 @@
   [(set (reg:SI T_REG) (zero_extract:SI (xor:SI (match_dup 0) (match_dup 1))
(const_int 1) (match_dup 2)))])
 
+;; Same thing, but when we use a PLUS rather than IOR/XOR for the rotation
+;; which causes things to simplify somewhat differently.
+(define_insn_and_split "*neg_zero_extract_4b"
+  [(set (reg:SI T_REG)
+   (and:SI (not:SI (plus:SI
+ (lshiftrt:SI (match_operand:SI 0 "arith_reg_operand")
+  (match_operand 1 "const_int_operand"))
+ (ashift:SI (match_operand:SI 2 "arith_reg_operand")
+(match_operand 3 "const_int_operand"
+   (const_int 1)))]
+  "TARGET_SH1 && can_create_pseudo_p ()
+   && INTVAL (operands[3]) > 0
+   && INTVAL (operands[1]) + INTVAL (operands[3]) == 32"
+  "#"
+  "&& 1"
+  [(set (reg:SI T_REG) (zero_extract:SI (xor:SI (match_dup 0) (match_dup 4))
+   (const_int 1) (match_dup 1)))]
+  { operands[4] = GEN_INT (1 << INTVAL (operands[1])); })
+
 (define_insn_and_split "*neg_zero_extract_5"
   [(set (reg:SI T_REG)
(and:SI (not:SI (subreg:SI


[Bug tree-optimization/115508] [14/15 regression] ICE when building flac with -O2 -march=znver1

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508

--- Comment #8 from Andrew Pinski  ---
Created attachment 58442
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58442=edit
Semi-cleaned up testcase with some extra hooks

So note if you change any of the `#if 0` to `#if 1` or `#if 1` to `#if 0` the
crash in SLP no longer happens.

Note also with the last one change, the only difference deals with the PERM
that is being selected in SLP:
Due to the order of `BIT_FIELD_REF ;` vs `BIT_FIELD_REF
;`. somehow.

[committed] Fix minor SH scan-asm failure after recent IOR->ADD changes

2024-06-15 Thread Jeff Law
This fixes minor fallout from the IOR->ADD change for rotates that I 
installed a little while ago.


Basically the SH backend has a special pattern for setting the T 
register that has elements similar to a rotate.  With the IOR->ADD 
change that pattern no longer matches and we get scan-asm failures.


Fixing isn't a trivial case of just replacing IOR with ADD as the 
IOR->ADD change changes some of the simplifications/canonicalizations 
along the way.


The net is we need a pattern with a slightly different structure.   I've 
regression tested this on sh3[eb]-linux-gnu and bootstrapped 
sh4-linux-gnu (without a regression test).


Pushing to the trunk,
Jeff

gcc/
* config/sh/sh.md (neg_zero_extract_4b): New pattern.


diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 19481c07db6..92a1efeb811 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -10093,6 +10093,25 @@ (define_insn_and_split "*neg_zero_extract_4"
   [(set (reg:SI T_REG) (zero_extract:SI (xor:SI (match_dup 0) (match_dup 1))
(const_int 1) (match_dup 2)))])
 
+;; Same thing, but when we use a PLUS rather than IOR/XOR for the rotation
+;; which causes things to simplify somewhat differently.
+(define_insn_and_split "*neg_zero_extract_4b"
+  [(set (reg:SI T_REG)
+   (and:SI (not:SI (plus:SI
+ (lshiftrt:SI (match_operand:SI 0 "arith_reg_operand")
+  (match_operand 1 "const_int_operand"))
+ (ashift:SI (match_operand:SI 2 "arith_reg_operand")
+(match_operand 3 "const_int_operand"
+   (const_int 1)))]
+  "TARGET_SH1 && can_create_pseudo_p ()
+   && INTVAL (operands[3]) > 0
+   && INTVAL (operands[1]) + INTVAL (operands[3]) == 32"
+  "#"
+  "&& 1"
+  [(set (reg:SI T_REG) (zero_extract:SI (xor:SI (match_dup 0) (match_dup 4))
+   (const_int 1) (match_dup 1)))]
+  { operands[4] = GEN_INT (1 << INTVAL (operands[1])); })
+
 (define_insn_and_split "*neg_zero_extract_5"
   [(set (reg:SI T_REG)
(and:SI (not:SI (subreg:SI


[Bug tree-optimization/115508] [14/15 regression] ICE when building flac with -O2 -march=znver1

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-06-16

--- Comment #7 from Andrew Pinski  ---
Confirmed.

[Bug tree-optimization/115508] [14/15 regression] ICE when building flac with -O2 -march=znver1

2024-06-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508

--- Comment #6 from Sam James  ---
Created attachment 58441
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58441=edit
reduced_more.i

[Bug tree-optimization/115508] [14/15 regression] ICE when building flac with -O2 -march=znver1

2024-06-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508

--- Comment #5 from Sam James  ---
On trunk with reduced.i, I get:
```
==3698089== Invalid read of size 8
==3698089==at 0x2430014: UnknownInlinedFun (tree-vect-slp.cc:9672)
==3698089==by 0x2430014: vect_schedule_slp_node(vec_info*, _slp_tree*,
_slp_instance*) (tree-vect-slp.cc:9514)
==3698089==by 0x242F05C: vect_schedule_scc(vec_info*, _slp_tree*,
_slp_instance*, hash_map<_slp_tree*, slp_scc_info,
simple_hashmap_traits, slp_scc_in
fo> >&, int&, vec<_slp_tree*, va_heap, vl_ptr>&) (tree-vect-slp.cc:9965)
==3698089==by 0x242EFAC: vect_schedule_scc(vec_info*, _slp_tree*,
_slp_instance*, hash_map<_slp_tree*, slp_scc_info,
simple_hashmap_traits, slp_scc_in
fo> >&, int&, vec<_slp_tree*, va_heap, vl_ptr>&) (tree-vect-slp.cc:9946)
==3698089==by 0x2139092: vect_schedule_slp(vec_info*, vec<_slp_instance*,
va_heap, vl_ptr> const&) (tree-vect-slp.cc:10110)
==3698089==by 0x1F013DB: vect_slp_region(vec, vec, vec*,
unsigned int, loop*) (tree-vect-sl
p.cc:8222)
==3698089==by 0x1EFD5B3: vect_slp_bbs(vec const&, loop*) [clone .lto_priv.0] (tree-vect-slp.cc:8322)
==3698089==by 0x1EFD2DA: vect_slp_function(function*)
(tree-vect-slp.cc:8444)
==3698089==by 0x1EFCC6C: (anonymous
namespace)::pass_slp_vectorize::execute(function*) [clone .lto_priv.0]
(tree-vectorizer.cc:1534)
==3698089==by 0x1B69A70: execute_one_pass(opt_pass*) (passes.cc:2647)
==3698089==by 0x1C2C09B: execute_pass_list_1(opt_pass*) (passes.cc:2756)
==3698089==by 0x1C2C0B8: execute_pass_list_1(opt_pass*) (passes.cc:2757)
==3698089==by 0x1C2C0B8: execute_pass_list_1(opt_pass*) (passes.cc:2757)
==3698089==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==3698089==
during GIMPLE pass: slp
a.i: In function
‘FLAC__fixed_compute_best_predictor_limit_residual_intrin_avx2’:
a.i:5:6: internal compiler error: Segmentation fault
5 | void FLAC__fixed_compute_best_predictor_limit_residual_intrin_avx2(
  |  ^
0x12a1362 crash_signal
/usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/toplev.cc:319
0x2430014 vect_schedule_slp_node
   
/usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/tree-vect-slp.cc:9672
0x2430014 vect_schedule_slp_node
   
/usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/tree-vect-slp.cc:9514
0x242f05c vect_schedule_scc
   
/usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/tree-vect-slp.cc:9965
0x242efac vect_schedule_scc
   
/usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/tree-vect-slp.cc:9946
0x2139092 vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap, vl_ptr>
const&)
   
/usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/tree-vect-slp.cc:10110
0x1f013db vect_slp_region
   
/usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/tree-vect-slp.cc:8222
0x1efd5b3 vect_slp_bbs
   
/usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/tree-vect-slp.cc:8322
0x1efd2da vect_slp_function(function*)
   
/usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/tree-vect-slp.cc:8444
0x1efcc6c execute
   
/usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/tree-vectorizer.cc:1534
```

I think pinskia will be able to simplify my reduced version more..

[Bug tree-optimization/115508] [14/15 regression] ICE when building flac with -O2 -march=znver1

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508

Andrew Pinski  changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu.org
   Target Milestone|--- |14.2
   Keywords||ice-on-valid-code

Results for 13.3.1 20240616 [remotes/origin/releases/gcc-13 r13-8851-g663be6b995f] (GCC) testsuite on pru-unknown-elf

2024-06-15 Thread The GnuPru BuildBot via Gcc-testresults
LAST_UPDATED: Sun Jun 16 02:37:00 UTC 2024 (revision r13-8851-g663be6b995f)

Target is pru-unknown-elf
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target pru-sim
FAIL: c-c++-common/pr103798-2.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-3.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-4.c  -Wc++-compat   scan-assembler-not memchr
FAIL: gcc.dg/20141029-1.c scan-rtl-dump-times final "mem/v(/.)*:HI" 4
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for short (test for 
warnings, line 51)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for signed char (test for 
warnings, line 50)
FAIL: gcc.dg/c2x-nullptr-1.c (test for excess errors)
UNRESOLVED: gcc.dg/c2x-nullptr-1.c compilation failed to produce executable
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/pr23623.c scan-rtl-dump-times final "mem/v(/.)*:SI" 12
FAIL: gcc.dg/pr82929-2.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/pr82929.c scan-tree-dump-times store-merging "Merging successful" 1
FAIL: gcc.dg/pr84877.c execution test
FAIL: gcc.dg/store_merging_1.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_10.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_11.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_13.c scan-tree-dump-times store-merging "Merging 
successful" 13
FAIL: gcc.dg/store_merging_14.c scan-tree-dump-times store-merging "Merging 
successful" 9
FAIL: gcc.dg/store_merging_15.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_2.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_20.c scan-tree-dump-times store-merging "Merging 
successful" 3
FAIL: gcc.dg/store_merging_21.c scan-tree-dump-times store-merging "Merging 
successful" 4
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "New 
sequence of 1 stores to replace old one of 3 stores" 1
FAIL: gcc.dg/store_merging_26.c scan-tree-dump store-merging "New sequence of 1 
stores to replace old one of 2 stores"
FAIL: gcc.dg/store_merging_27.c scan-tree-dump store-merging "New sequence of 
[12] stores to replace old one of 3 stores"
FAIL: gcc.dg/store_merging_28.c scan-tree-dump-times store-merging "New 
sequence of [24] stores to replace old one of 6 stores" 1
FAIL: gcc.dg/store_merging_29.c scan-tree-dump store-merging "New sequence of 3 
stores to replace old one of 6 stores"
FAIL: gcc.dg/store_merging_4.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "MEM 
 [.*]" 1
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_7.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_8.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_9.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/uninit-pred-9_b.c bogus warning (test for bogus messages, line 20)
FAIL: gcc.dg/tree-ssa/ctz-char.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-char.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-int.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-long.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-int.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-long.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  [(char *)] = "
FAIL: gcc.dg/tree-ssa/if-to-switch-1.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/if-to-switch-10.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/if-to-switch-3.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/if-to-switch-9.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/ssa-dom-thread-7.c scan-tree-dump thread2 "Jumps 
threaded: 9"
FAIL: outputs-22 exe savetmp namedb-2: outputs.ld1_args
FAIL: 

[Bug tree-optimization/115508] ICE when building flac with -O2 -march=znver1

2024-06-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508

--- Comment #4 from Sam James  ---
Created attachment 58440
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58440=edit
reduced.i

[Bug tree-optimization/115508] ICE when building flac with -O2 -march=znver1

2024-06-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508

--- Comment #3 from Sam James  ---
> I can't reproduce it with -march=znver2, just -march=znver1. Not compared
> the diff yet.

-march=znver2 -mprefer-vector-width=128 fails too

Results for 12.3.1 20240616 [remotes/origin/releases/gcc-12 r12-10560-g26640a512ad] (GCC) testsuite on pru-unknown-elf

2024-06-15 Thread The GnuPru BuildBot via Gcc-testresults
LAST_UPDATED: Sun Jun 16 02:14:40 UTC 2024 (revision r12-10560-g26640a512ad)

Target is pru-unknown-elf
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target pru-sim
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O0   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O1   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O2   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O3 -g   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -Os   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O0  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O1  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O2  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O3 -g  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -Os  (test for excess errors)
FAIL: gcc.dg/debug/btf/btf-bitfields-1.c scan-assembler-times [\\t 
]0x1340[\\t ]+[^\\n]*btm_offset 1
FAIL: c-c++-common/Wcast-align.c  -Wc++-compat   (test for warnings, line 19)
FAIL: c-c++-common/Wcast-align.c  -Wc++-compat   (test for warnings, line 20)
FAIL: c-c++-common/auto-init-7.c  -Wc++-compat   scan-tree-dump gimple "temp4 = 
.DEFERRED_INIT (8, 2, &"temp4""
FAIL: c-c++-common/auto-init-8.c  -Wc++-compat   scan-tree-dump gimple "temp4 = 
.DEFERRED_INIT (8, 1, &"temp4""
FAIL: gcc.dg/20141029-1.c scan-rtl-dump-times final "mem/v(/.)*:HI" 4
FAIL: gcc.dg/Warray-bounds-48-novec.c (test for excess errors)
FAIL: gcc.dg/Wattributes-8.c  (test for bogus messages, line 27)
FAIL: gcc.dg/Wattributes-8.c  (test for bogus messages, line 28)
FAIL: gcc.dg/Wno-frame-address.c (test for excess errors)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for short (test for 
warnings, line 51)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for signed char (test for 
warnings, line 50)
FAIL: gcc.dg/builtin-object-size-20.c scan-tree-dump-not optimized "fail"
FAIL: gcc.dg/c11-align-4.c  (test for errors, line 9)
FAIL: gcc.dg/complex-6.c scan-tree-dump-times cplxlower1 "__mulsc3" 1
FAIL: gcc.dg/complex-7.c scan-tree-dump-times cplxlower1 "__muldc3" 1
FAIL: gcc.dg/ifcvt-4.c scan-rtl-dump ce1 "2 true changes made"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/lower-subreg-1.c scan-rtl-dump subreg1 "Splitting reg"
FAIL: gcc.dg/mallign.c (test for excess errors)
FAIL: gcc.dg/memchr.c (test for excess errors)
UNRESOLVED: gcc.dg/memchr.c scan-tree-dump-not optimized "abort"
FAIL: gcc.dg/memcmp-3.c (test for excess errors)
UNRESOLVED: gcc.dg/memcmp-3.c scan-tree-dump-not optimized "abort"
FAIL: gcc.dg/pr23623.c scan-rtl-dump-times final "mem/v(/.)*:SI" 12
FAIL: gcc.dg/pr46647.c scan-tree-dump-not optimized "memset"
FAIL: gcc.dg/pr82929-2.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/pr82929.c scan-tree-dump-times store-merging "Merging successful" 1
FAIL: gcc.dg/pr84877.c execution test
FAIL: gcc.dg/store_merging_1.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_10.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_11.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_13.c scan-tree-dump-times store-merging "Merging 
successful" 13
FAIL: gcc.dg/store_merging_14.c scan-tree-dump-times store-merging "Merging 
successful" 9
FAIL: gcc.dg/store_merging_15.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_2.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_20.c scan-tree-dump-times store-merging "Merging 
successful" 3
FAIL: gcc.dg/store_merging_21.c scan-tree-dump-times store-merging "Merging 
successful" 4
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "New 
sequence of 1 stores to replace old one of 3 stores" 1
FAIL: gcc.dg/store_merging_26.c scan-tree-dump store-merging "New sequence of 1 
stores to replace old one of 2 stores"
FAIL: gcc.dg/store_merging_27.c scan-tree-dump store-merging "New sequence of 
[12] stores to replace old one of 3 stores"
FAIL: gcc.dg/store_merging_28.c scan-tree-dump-times store-merging "New 
sequence of [24] stores to replace old one of 6 stores" 1
FAIL: gcc.dg/store_merging_29.c scan-tree-dump store-merging "New sequence of 3 
stores to replace 

[PATCH] c++/modules: Ensure deduction guides are always reachable [PR115231]

2024-06-15 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk?

This probably isn't the most efficient approach, since we need to do
name lookup to find deduction guides for a type which will also
potentially do a bunch of pointless lazy loading from imported modules,
but I wasn't able to work out a better approach without completely
reworking how deduction guides are stored and represented.  This way at
least is correct (I believe), and we can maybe revisit this in the
future.

-- >8 --

Deduction guides are represented as 'normal' functions currently, and
have no special handling in modules.  However, this causes some issues;
by [temp.deduct.guide] a deduction guide is not found by normal name
lookup and instead all reachable deduction guides for a class template
should be considered, but this does not happen currently.

To solve this, this patch ensures that all deduction guides are
considered exported to ensure that they are always visible to importers
if they are reachable.  Another alternative here would be to add a new
kind of "all reachable" flag to name lookup, but that is complicated by
some difficulties in handling GM entities; this may be a better way to
go if more kinds of entities end up needing this handling, however.

Another issue here is that because deduction guides are "unrelated"
functions, they will usually get discarded from the GMF, so this patch
ensures that when finding dependencies, GMF deduction guides will also
have bindings created.  We do this in find_dependencies so that we don't
unnecessarily create bindings for GMF deduction guides that are never
reached; for consistency we do this for *all* deduction guides, not just
GM ones.

Finally, when merging deduction guides from multiple modules, the name
lookup code may now return two-dimensional overload sets, so update
callers to match.

As a small drive-by improvement this patch also updates the error pretty
printing code to add a space before the '->' when printing a deduction
guide, so we get 'S(int) -> S' instead of 'S(int)-> S'.

PR c++/115231

gcc/cp/ChangeLog:

* error.cc (dump_function_decl): Add a space before '->' when
printing deduction guides.
* module.cc (depset::hash::add_binding_entity): Skip deduction
guides here.
(depset::hash::add_deduction_guides): New.
(depset::hash::find_dependencies): Add deduction guide
dependencies for a class template.
(module_state::write_cluster): Always consider deduction guides
as exported.
* pt.cc (deduction_guides_for): Use 'lkp_iterator' instead of
'ovl_iterator'.

gcc/testsuite/ChangeLog:

* g++.dg/modules/dguide-1_a.C: New test.
* g++.dg/modules/dguide-1_b.C: New test.
* g++.dg/modules/dguide-2_a.C: New test.
* g++.dg/modules/dguide-2_b.C: New test.
* g++.dg/modules/dguide-3_a.C: New test.
* g++.dg/modules/dguide-3_b.C: New test.
* g++.dg/modules/dguide-3_c.C: New test.

Signed-off-by: Nathaniel Shead 
---
 gcc/cp/error.cc   |  1 +
 gcc/cp/module.cc  | 60 +++
 gcc/cp/pt.cc  |  2 +-
 gcc/testsuite/g++.dg/modules/dguide-1_a.C | 44 +
 gcc/testsuite/g++.dg/modules/dguide-1_b.C | 20 
 gcc/testsuite/g++.dg/modules/dguide-2_a.C | 24 +
 gcc/testsuite/g++.dg/modules/dguide-2_b.C | 19 +++
 gcc/testsuite/g++.dg/modules/dguide-3_a.C | 10 
 gcc/testsuite/g++.dg/modules/dguide-3_b.C | 10 
 gcc/testsuite/g++.dg/modules/dguide-3_c.C | 22 +
 10 files changed, 211 insertions(+), 1 deletion(-)
 create mode 100644 gcc/testsuite/g++.dg/modules/dguide-1_a.C
 create mode 100644 gcc/testsuite/g++.dg/modules/dguide-1_b.C
 create mode 100644 gcc/testsuite/g++.dg/modules/dguide-2_a.C
 create mode 100644 gcc/testsuite/g++.dg/modules/dguide-2_b.C
 create mode 100644 gcc/testsuite/g++.dg/modules/dguide-3_a.C
 create mode 100644 gcc/testsuite/g++.dg/modules/dguide-3_b.C
 create mode 100644 gcc/testsuite/g++.dg/modules/dguide-3_c.C

diff --git a/gcc/cp/error.cc b/gcc/cp/error.cc
index 171a352c85f..2fb5084320e 100644
--- a/gcc/cp/error.cc
+++ b/gcc/cp/error.cc
@@ -1866,6 +1866,7 @@ dump_function_decl (cxx_pretty_printer *pp, tree t, int 
flags)
dump_type_suffix (pp, ret, flags);
   else if (deduction_guide_p (t))
{
+ pp->set_padding (pp_before);
  pp_cxx_ws_string (pp, "->");
  dump_type (pp, TREE_TYPE (TREE_TYPE (t)), flags);
}
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index 6d6044af199..a2c9e151fd5 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -2589,6 +2589,9 @@ public:
 void add_partial_entities (vec *);
 void add_class_entities (vec *);
 
+  private:
+void add_deduction_guides (tree decl);
+
   public:
 void find_dependencies (module_state *);
 bool finalize_dependencies ();
@@ -13127,6 +13130,11 @@ 

[Bug tree-optimization/115508] ICE when building flac with -O2 -march=znver1

2024-06-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508

--- Comment #2 from Sam James  ---
I'm reducing.

[Bug tree-optimization/115508] ICE when building flac with -O2 -march=znver1

2024-06-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508

--- Comment #1 from Sam James  ---

==3050649== Invalid read of size 8
==3050649==at 0x192EB36: vect_schedule_slp_node(vec_info*, _slp_tree*,
_slp_instance*) [clone .part.0] (tree-vect-slp.cc:9279)
==3050649==by 0x1948643: vect_schedule_slp_node (tree-vect-slp.cc:9248)
==3050649==by 0x1948643: vect_schedule_scc(vec_info*, _slp_tree*,
_slp_instance*, hash_map<_slp_tree*, slp_scc_info,
simple_hashmap_traits, slp_scc_in
fo> >&, int&, vec<_slp_tree*, va_heap, vl_ptr>&) (tree-vect-slp.cc:9682)
==3050649==by 0x19486A8: vect_schedule_scc(vec_info*, _slp_tree*,
_slp_instance*, hash_map<_slp_tree*, slp_scc_info,
simple_hashmap_traits, slp_scc_in
fo> >&, int&, vec<_slp_tree*, va_heap, vl_ptr>&) (tree-vect-slp.cc:9663)
==3050649==by 0x1948E7A: vect_schedule_slp(vec_info*, vec<_slp_instance*,
va_heap, vl_ptr> const&) (tree-vect-slp.cc:9827)
==3050649==by 0x194BCC9: vect_slp_region(vec, vec, vec*,
unsigned int, loop*) (tree-vect-sl
p.cc:7948)
==3050649==by 0x194D54A: vect_slp_bbs(vec const&, loop*) (tree-vect-slp.cc:8048)
==3050649==by 0x194DBEA: vect_slp_function(function*)
(tree-vect-slp.cc:8170)
==3050649==by 0x1959B75: (anonymous
namespace)::pass_slp_vectorize::execute(function*) (tree-vectorizer.cc:1533)
==3050649==by 0x1405CC2: execute_one_pass(opt_pass*) (passes.cc:2647)
==3050649==by 0x1406B39: execute_pass_list_1 (passes.cc:2756)
==3050649==by 0x1406B39: execute_pass_list_1(opt_pass*) (passes.cc:2757)
==3050649==by 0x1406EF6: execute_pass_list_1 (passes.cc:2757)
==3050649==by 0x1406EF6: execute_pass_list(function*, opt_pass*)
(passes.cc:2767)
==3050649==by 0xF02976: cgraph_node::expand() (cgraphunit.cc:1845)
==3050649==  Address 0x20 is not stack'd, malloc'd or (recently) free'd
==3050649==
during GIMPLE pass: slp
/var/tmp/portage/media-libs/flac-1.4.3/work/flac-1.4.3/src/libFLAC/fixed_intrin_avx2.c:
In function 'FLAC__fixed_compute_best_predictor_wide_intrin_avx2':
/var/tmp/portage/media-libs/flac-1.4.3/work/flac-1.4.3/src/libFLAC/fixed_intrin_avx2.c:57:10:
internal compiler error: Segmentation fault

[Bug tree-optimization/115508] New: ICE when building flac with -O2 -march=znver1

2024-06-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508

Bug ID: 115508
   Summary: ICE when building flac with -O2 -march=znver1
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58439
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58439=edit
fixed_intrin_avx2.i.xz

Originally reported downstream in Gentoo at https://bugs.gentoo.org/934383.

I can't reproduce it with -march=znver2, just -march=znver1. Not compared the
diff yet.

```
$ gcc-14 -c a.i -march=znver1 -m32 -mfpmath=sse -O2
during GIMPLE pass: slp
/var/tmp/portage/media-libs/flac-1.4.3/work/flac-1.4.3/src/libFLAC/fixed_intrin_avx2.c:
In function 'FLAC__fixed_compute_best_predictor_wide_intrin_avx2':
/var/tmp/portage/media-libs/flac-1.4.3/work/flac-1.4.3/src/libFLAC/fixed_intrin_avx2.c:57:10:
internal compiler error: Segmentation fault
0x55ccfe748bc3 crash_signal
   
/usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/toplev.cc:319
0x55ccfeaceb36 vect_schedule_slp_node
   
/usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:9279
0x55ccfeae8643 vect_schedule_slp_node
   
/usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:9248
0x55ccfeae8643 vect_schedule_scc
   
/usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:9682
0x55ccfeae86a8 vect_schedule_scc
   
/usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:9663
0x55ccfeae8e7a vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap,
vl_ptr> const&)
   
/usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:9827
0x55ccfeaebcc9 vect_slp_region
   
/usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:7948
0x55ccfeaed54a vect_slp_bbs
   
/usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:8048
0x55ccfeaedbea vect_slp_function(function*)
   
/usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:8170
0x55ccfeaf9b75 execute
   
/usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vectorizer.cc:1533
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

---

```
Using built-in specs.
COLLECT_GCC=gcc-14
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/14/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-14.1.1_p20240608/work/gcc-14-20240608/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/14
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/14/python
--enable-languages=c,c++,fortran,rust --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --disable-nls
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened
14.1.1_p20240608 p2' --with-gcc-major-version-only --enable-libstdcxx-time
--enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-multilib
--with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all
--enable-libgomp --disable-libssp --disable-libada --disable-cet
--disable-systemtap --enable-valgrind-annotations --disable-vtable-verify
--disable-libvtv --with-zstd --with-isl --disable-isl-version-check
--enable-default-pie --enable-host-pie --enable-host-bind-now
--enable-default-ssp --disable-fixincludes --with-build-config=bootstrap-O3
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.1.1 20240608 (Gentoo Hardened 14.1.1_p20240608 p2)
```

[PATCH] c++: Simplify uses of LAMBDA_EXPR_EXTRA_SCOPE

2024-06-15 Thread Nathaniel Shead
No functional change intended; OK for trunk?

-- >8 --

I noticed there already exists a getter to get the scope of a lambda
from its type directly rather than needing to go via
CLASSTYPE_LAMBDA_EXPR, we may as well use it.

gcc/cp/ChangeLog:

* module.cc (trees_out::get_merge_kind): Use
LAMBDA_TYPE_EXTRA_SCOPE instead of LAMBDA_EXPR_EXTRA_SCOPE.
(trees_out::key_mergeable): Likewise.

Signed-off-by: Nathaniel Shead 
---
 gcc/cp/module.cc | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index ea7ad0c1f29..6d6044af199 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -10686,9 +10686,7 @@ trees_out::get_merge_kind (tree decl, depset *dep)
   g++.dg/modules/lambda-6_a.C.  */
if (DECL_IMPLICIT_TYPEDEF_P (STRIP_TEMPLATE (decl))
&& LAMBDA_TYPE_P (TREE_TYPE (decl)))
- if (tree scope
- = LAMBDA_EXPR_EXTRA_SCOPE (CLASSTYPE_LAMBDA_EXPR
-(TREE_TYPE (decl
+ if (tree scope = LAMBDA_TYPE_EXTRA_SCOPE (TREE_TYPE (decl)))
{
  /* Lambdas attached to fields are keyed to its class.  */
  if (TREE_CODE (scope) == FIELD_DECL)
@@ -10993,8 +10991,7 @@ trees_out::key_mergeable (int tag, merge_kind mk, tree 
decl, tree inner,
case MK_keyed:
  {
gcc_checking_assert (LAMBDA_TYPE_P (TREE_TYPE (inner)));
-   tree scope = LAMBDA_EXPR_EXTRA_SCOPE (CLASSTYPE_LAMBDA_EXPR
- (TREE_TYPE (inner)));
+   tree scope = LAMBDA_TYPE_EXTRA_SCOPE (TREE_TYPE (inner));
gcc_checking_assert (TREE_CODE (scope) == VAR_DECL
 || TREE_CODE (scope) == FIELD_DECL
 || TREE_CODE (scope) == PARM_DECL
-- 
2.43.2



Results for 11.4.1 20240616 [remotes/origin/releases/gcc-11 revision 87abb9e4d9b:0453b404361:e24a16867b4fd4725cf1e2cc08dde94d08fba404] (GCC) testsuite on pru-unknown-elf

2024-06-15 Thread The GnuPru BuildBot via Gcc-testresults
LAST_UPDATED: Sun Jun 16 01:54:17 UTC 2024 (revision 
87abb9e4d9b:0453b404361:e24a16867b4fd4725cf1e2cc08dde94d08fba404)

Target is pru-unknown-elf
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target pru-sim
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O0  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O1  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O2  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O3 -g  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -Os  (test for excess errors)
FAIL: gcc.dg/debug/dwarf2/inline5.c scan-assembler-not (DIE 
(0x([0-9a-f]*)) DW_TAG_lexical_block)[^#/!@;|]*[#/!@;|]+ 
+[^(].*DW_TAG_lexical_block)[^#/!@;|x]*x1[^#/!@;|]*[#/!@;|] 
+DW_AT_abstract_origin
FAIL: c-c++-common/Wcast-align.c  -Wc++-compat   (test for warnings, line 19)
FAIL: c-c++-common/Wcast-align.c  -Wc++-compat   (test for warnings, line 20)
FAIL: gcc.dg/20141029-1.c scan-rtl-dump-times final "mem/v(/.)*:HI" 4
FAIL: gcc.dg/Warray-bounds-48.c (test for excess errors)
FAIL: gcc.dg/Wattributes-8.c  (test for bogus messages, line 27)
FAIL: gcc.dg/Wattributes-8.c  (test for bogus messages, line 28)
FAIL: gcc.dg/Wno-frame-address.c (test for excess errors)
XPASS: gcc.dg/Wstringop-overflow-43.c pr? (test for warnings, line 172)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for short (test for 
warnings, line 51)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for signed char (test for 
warnings, line 50)
FAIL: gcc.dg/builtin-object-size-20.c scan-tree-dump-not optimized "fail"
FAIL: gcc.dg/c11-align-4.c  (test for errors, line 9)
FAIL: gcc.dg/complex-6.c scan-tree-dump-times cplxlower1 "__mulsc3" 1
FAIL: gcc.dg/complex-7.c scan-tree-dump-times cplxlower1 "__muldc3" 1
FAIL: gcc.dg/ifcvt-4.c scan-rtl-dump ce1 "2 true changes made"
FAIL: gcc.dg/loop-8.c scan-rtl-dump-not loop2_invariant "without introducing a 
new temporary register"
FAIL: gcc.dg/loop-8.c scan-rtl-dump-times loop2_invariant "Decided" 1
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/lower-subreg-1.c scan-rtl-dump subreg1 "Splitting reg"
FAIL: gcc.dg/mallign.c (test for excess errors)
FAIL: gcc.dg/memchr.c (test for excess errors)
UNRESOLVED: gcc.dg/memchr.c scan-tree-dump-not optimized "abort"
FAIL: gcc.dg/memcmp-3.c (test for excess errors)
UNRESOLVED: gcc.dg/memcmp-3.c scan-tree-dump-not optimized "abort"
FAIL: gcc.dg/pr23623.c scan-rtl-dump-times final "mem/v(/.)*:SI" 12
FAIL: gcc.dg/pr46647.c scan-tree-dump-not optimized "memset"
FAIL: gcc.dg/pr82929-2.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/pr82929.c scan-tree-dump-times store-merging "Merging successful" 1
FAIL: gcc.dg/pr84877.c execution test
FAIL: gcc.dg/store_merging_1.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_10.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_11.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_13.c scan-tree-dump-times store-merging "Merging 
successful" 13
FAIL: gcc.dg/store_merging_14.c scan-tree-dump-times store-merging "Merging 
successful" 9
FAIL: gcc.dg/store_merging_15.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_2.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_20.c scan-tree-dump-times store-merging "Merging 
successful" 3
FAIL: gcc.dg/store_merging_21.c scan-tree-dump-times store-merging "Merging 
successful" 4
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "New 
sequence of 1 stores to replace old one of 3 stores" 1
FAIL: gcc.dg/store_merging_26.c scan-tree-dump store-merging "New sequence of 1 
stores to replace old one of 2 stores"
FAIL: gcc.dg/store_merging_27.c scan-tree-dump store-merging "New sequence of 
[12] stores to replace old one of 3 stores"
FAIL: gcc.dg/store_merging_28.c scan-tree-dump-times store-merging "New 
sequence of [24] stores to replace old one of 6 stores" 1
FAIL: gcc.dg/store_merging_29.c scan-tree-dump store-merging "New sequence of 3 
stores to replace old one of 6 stores"
FAIL: gcc.dg/store_merging_4.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "MEM 
 [.*]" 1
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "Merging 
successful" 1

Results for 15.0.0 20240616 (experimental) [remotes/origin/master r15-1353-gdff55a5a0e1] (GCC) testsuite on avr-unknown-none

2024-06-15 Thread The GnuPru BuildBot via Gcc-testresults
WARNING: Many C++ failures have been omitted due to lack of libstdc++ on AVR!
Only G++ regressions are reported below.


LAST_UPDATED: Sun Jun 16 01:31:14 UTC 2024 (revision r15-1353-gdff55a5a0e1)

Target is avr-unknown-none
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target atmega128-sim
FAIL: gcc.c-torture/execute/conversion.c   -O0  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O0  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O1  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O2  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -Os  execution test
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O0 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O1 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O2 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O2 -flto 
-fno-use-linker-plugin -flto-partition=none 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O3 
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O3 -g 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -Og -g 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -Os 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O0 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O1 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O2 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O2 -flto 
-fno-use-linker-plugin -flto-partition=none 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O3 
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O3 -g 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -Og -g 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -Os 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O0 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O1 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O2 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O2 -flto 
-fno-use-linker-plugin -flto-partition=none 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O3 
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O3 -g 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -Og -g 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -Os 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O0 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O1 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O2 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O2 -flto 
-fno-use-linker-plugin -flto-partition=none 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O3 
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O3 -g 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -Og -g 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -Os 
FAIL: gcc.c-torture/execute/ieee/fp-cmp-3.c execution,  -O0 
FAIL: gcc.c-torture/execute/ieee/fp-cmp-3.c execution,  -Og -g 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -O0 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -O1 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -O2 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -O2 -flto 
-fno-use-linker-plugin -flto-partition=none 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -Og -g 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -Os 
FAIL: c-c++-common/analyzer/allocation-size-pr113654-1.c (test for excess 
errors)
FAIL: c-c++-common/analyzer/allocation-size-pr113654-1.c PR analyzer/113654 
(test for bogus messages, line 46)
FAIL: c-c++-common/analyzer/flex-without-call-summaries.c  (test for warnings, 
line 882)

Re: [PATCH v3 1/3] diagnostics: Enable escape sequence processing on windows consoles

2024-06-15 Thread Jonathan Yong

On 6/3/24 17:07, Peter Damianov wrote:

Since windows 10 release v1511, the windows console has had support for VT100
escape sequences. We should try to enable this, and utilize it where possible.


Thank you. Patches look good to me, pushed to master branch.



[gcc r15-1356] pretty-print: Don't translate escape sequences to windows console API

2024-06-15 Thread Jonathan Yong via Gcc-cvs
https://gcc.gnu.org/g:bc630d613db94eb50687a009ae6b45098ab02db5

commit r15-1356-gbc630d613db94eb50687a009ae6b45098ab02db5
Author: Peter Damianov 
Date:   Mon Jun 3 10:07:10 2024 -0700

pretty-print: Don't translate escape sequences to windows console API

Modern versions of windows (after windows 10 v1511) support VT100 escape
sequences, so translation for them is not necessary. The translation also
mangles embedded warning documentation links.

gcc/ChangeLog:
* pretty-print.cc (mingw_ansi_fputs): Don't translate escape 
sequences if
the console has ENABLE_VIRTUAL_TERMINAL_PROCESSING.

Signed-off-by: Peter Damianov 

Diff:
---
 gcc/pretty-print.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/pretty-print.cc b/gcc/pretty-print.cc
index 639e2b881586..ec44172f24df 100644
--- a/gcc/pretty-print.cc
+++ b/gcc/pretty-print.cc
@@ -674,8 +674,9 @@ mingw_ansi_fputs (const char *str, FILE *fp)
   /* Don't mess up stdio functions with Windows APIs.  */
   fflush (fp);
 
-  if (GetConsoleMode (h, ))
-/* If it is a console, translate ANSI escape codes as needed.  */
+  if (GetConsoleMode (h, ) && !(mode & 
ENABLE_VIRTUAL_TERMINAL_PROCESSING))
+/* If it is a console, and doesn't support ANSI escape codes, translate
+   them as needed.  */
 for (;;)
   {
if ((esc_code = find_esc_head (_len, _head, read)) == 0)


[gcc r15-1355] diagnostics: Don't hardcode auto_enable_urls to false for mingw hosts

2024-06-15 Thread Jonathan Yong via Gcc-cvs
https://gcc.gnu.org/g:5c662a3a5724b75ceb06496d9c64137d59c89d39

commit r15-1355-g5c662a3a5724b75ceb06496d9c64137d59c89d39
Author: Peter Damianov 
Date:   Mon Jun 3 10:07:09 2024 -0700

diagnostics: Don't hardcode auto_enable_urls to false for mingw hosts

Windows terminal and mintty both have support for link escape sequences, 
and so
auto_enable_urls shouldn't be hardcoded to false. For older versions of the
windows console, mingw_ansi_fputs's console API translation logic does 
mangle
these sequences, but there's nothing useful it could do even if this weren't
the case, so check if the ansi escape sequences are supported at all.

conhost.exe doesn't support link escape sequences, but printing them does 
not
cause any problems.

gcc/ChangeLog:
* diagnostic-color.cc (auto_enable_urls): Don't hardcode to return
false on mingw hosts.
(auto_enable_urls): Return true if console
supports ansi escape sequences.

Signed-off-by: Peter Damianov 

Diff:
---
 gcc/diagnostic-color.cc | 19 +++
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/gcc/diagnostic-color.cc b/gcc/diagnostic-color.cc
index 261a14b6c5f2..184419cea367 100644
--- a/gcc/diagnostic-color.cc
+++ b/gcc/diagnostic-color.cc
@@ -384,9 +384,6 @@ parse_env_vars_for_urls ()
 static bool
 auto_enable_urls ()
 {
-#ifdef __MINGW32__
-  return false;
-#else
   const char *term, *colorterm;
 
   /* First check the terminal is capable of printing color escapes,
@@ -394,6 +391,21 @@ auto_enable_urls ()
   if (!should_colorize ())
 return false;
 
+#ifdef __MINGW32__
+  HANDLE handle;
+  DWORD mode;
+
+  handle = GetStdHandle (STD_ERROR_HANDLE);
+  if ((handle == INVALID_HANDLE_VALUE) || (handle == NULL))
+return false;
+
+  /* If ansi escape sequences aren't supported by the console, then URLs will
+ print mangled from mingw_ansi_fputs's console API translation. It wouldn't
+ be useful even if this weren't the case.  */
+  if (GetConsoleMode (handle, ) && !(mode & 
ENABLE_VIRTUAL_TERMINAL_PROCESSING))
+return false;
+#endif
+
   /* xfce4-terminal is known to not implement URLs at this time.
  Recently new installations (0.8) will safely ignore the URL escape
  sequences, but a large number of legacy installations (0.6.3) print
@@ -428,7 +440,6 @@ auto_enable_urls ()
 return false;
 
   return true;
-#endif
 }
 
 /* Determine if URLs should be enabled, based on RULE,


[gcc r15-1354] diagnostics: Enable escape sequence processing on windows consoles

2024-06-15 Thread Jonathan Yong via Gcc-cvs
https://gcc.gnu.org/g:e943a5da40cd4799908d3d29001e1325eb00b755

commit r15-1354-ge943a5da40cd4799908d3d29001e1325eb00b755
Author: Peter Damianov 
Date:   Mon Jun 3 10:07:08 2024 -0700

diagnostics: Enable escape sequence processing on windows consoles

Since windows 10 release v1511, the windows console has had support for 
VT100
escape sequences. We should try to enable this, and utilize it where 
possible.

gcc/ChangeLog:
* diagnostic-color.cc (should_colorize): Enable processing of VT100
escape sequences on windows consoles

Signed-off-by: Peter Damianov 

Diff:
---
 gcc/diagnostic-color.cc | 21 -
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/gcc/diagnostic-color.cc b/gcc/diagnostic-color.cc
index cbe57ce763f2..261a14b6c5f2 100644
--- a/gcc/diagnostic-color.cc
+++ b/gcc/diagnostic-color.cc
@@ -300,12 +300,23 @@ should_colorize (void)
  pp_write_text_to_stream() in pretty-print.cc calls fputs() on
  that stream.  However, the code below for non-Windows doesn't seem
  to care about it either...  */
-  HANDLE h;
-  DWORD m;
+  HANDLE handle;
+  DWORD mode;
+  BOOL isconsole = false;
 
-  h = GetStdHandle (STD_ERROR_HANDLE);
-  return (h != INVALID_HANDLE_VALUE) && (h != NULL)
- && GetConsoleMode (h, );
+  handle = GetStdHandle (STD_ERROR_HANDLE);
+
+  if ((handle != INVALID_HANDLE_VALUE) && (handle != NULL))
+isconsole = GetConsoleMode (handle, );
+
+  if (isconsole)
+{
+  /* Try to enable processing of VT100 escape sequences */
+  mode |= ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING;
+  SetConsoleMode (handle, mode);
+}
+
+  return isconsole;
 #else
   char const *t = getenv ("TERM");
   /* emacs M-x shell sets TERM="dumb".  */


Results for 13.3.1 20240616 [remotes/origin/releases/gcc-13 r13-8851-g663be6b995f] (GCC) testsuite on avr-unknown-none

2024-06-15 Thread The GnuPru BuildBot via Gcc-testresults
WARNING: Many C++ failures have been omitted due to lack of libstdc++ on AVR!
Only G++ regressions are reported below.


LAST_UPDATED: Sun Jun 16 01:08:26 UTC 2024 (revision r13-8851-g663be6b995f)

Target is avr-unknown-none
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target atmega128-sim
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -Os  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O0   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O0  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O1   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O1  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O3 -g   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O3 -g  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -Os   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O0   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O1   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O2   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O3 -g   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -Os   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/pr103813.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O1  (test for excess 

[Bug target/114528] (0xFFFFFFFF0001FFFFULL - 0x00123000) constant forming could be done in 2 instructions

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114528

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2024-06-16

--- Comment #2 from Andrew Pinski  ---
.

Results for 13.3.1 20240616 [remotes/origin/releases/gcc-13 r13-8851-g663be6b995f] (GCC) testsuite on avr-unknown-none

2024-06-15 Thread The GnuPru BuildBot via Gcc-testresults
WARNING: Many C++ failures have been omitted due to lack of libstdc++ on AVR!
Only G++ regressions are reported below.


LAST_UPDATED: Sun Jun 16 00:45:34 UTC 2024 (revision r13-8851-g663be6b995f)

Target is avr-unknown-none
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target atmega128-sim
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -Os  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O0   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O0  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O1   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O1  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O3 -g   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O3 -g  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -Os   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O0   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O1   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O2   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O3 -g   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -Os   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/pr103813.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O1  (test for excess 

[PATCH v4] gcc, libcpp: Add warning switch for "#pragma once in main file" [PR89808]

2024-06-15 Thread Ken Matsui
This patch adds a warning switch for "#pragma once in main file".  The
warning option name is Wpragma-once-outside-header, which is the same
as Clang provides.

PR preprocessor/89808

gcc/c-family/ChangeLog:

* c.opt (Wpragma_once_outside_header): Define new option.
* c.opt.urls: Regenerate.

gcc/ChangeLog:

* doc/invoke.texi (Warning Options): Document
-Wno-pragma-once-outside-header.

libcpp/ChangeLog:

* include/cpplib.h (cpp_warning_reason): Define
CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER.
* directives.cc (do_pragma_once): Use
CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER.

gcc/testsuite/ChangeLog:

* g++.dg/warn/Wno-pragma-once-outside-header.C: New test.
* g++.dg/warn/Wpragma-once-outside-header.C: New test.

Signed-off-by: Ken Matsui 
---
 gcc/c-family/c.opt |  4 
 gcc/c-family/c.opt.urls|  3 +++
 gcc/doc/invoke.texi| 10 --
 .../g++.dg/warn/Wno-pragma-once-outside-header.C   |  5 +
 .../g++.dg/warn/Wpragma-once-outside-header.C  |  6 ++
 libcpp/directives.cc   |  3 ++-
 libcpp/include/cpplib.h|  3 ++-
 7 files changed, 30 insertions(+), 4 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/warn/Wno-pragma-once-outside-header.C
 create mode 100644 gcc/testsuite/g++.dg/warn/Wpragma-once-outside-header.C

diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 403abc1f26e..3439f36fe45 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1188,6 +1188,10 @@ Wpragmas
 C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning
 Warn about misuses of pragmas.
 
+Wpragma-once-outside-header
+C ObjC C++ ObjC++ Var(warn_pragma_once_outside_header) 
CppReason(CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER) Init(1) Warning
+Warn about #pragma once outside of a header.
+
 Wprio-ctor-dtor
 C ObjC C++ ObjC++ Var(warn_prio_ctor_dtor) Init(1) Warning
 Warn if constructor or destructors with priorities from 0 to 100 are used.
diff --git a/gcc/c-family/c.opt.urls b/gcc/c-family/c.opt.urls
index dd455d7c0dc..778ca08be2e 100644
--- a/gcc/c-family/c.opt.urls
+++ b/gcc/c-family/c.opt.urls
@@ -672,6 +672,9 @@ 
UrlSuffix(gcc/Warning-Options.html#index-Wno-pointer-to-int-cast)
 Wpragmas
 UrlSuffix(gcc/Warning-Options.html#index-Wno-pragmas)
 
+Wpragma-once-outside-header
+UrlSuffix(gcc/Warning-Options.html#index-Wno-pragma-once-outside-header)
+
 Wprio-ctor-dtor
 UrlSuffix(gcc/Warning-Options.html#index-Wno-prio-ctor-dtor)
 
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 9456ced468a..c7f17ca9eb7 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -391,8 +391,8 @@ Objective-C and Objective-C++ Dialects}.
 -Wpacked  -Wno-packed-bitfield-compat  -Wpacked-not-aligned  -Wpadded
 -Wparentheses  -Wno-pedantic-ms-format
 -Wpointer-arith  -Wno-pointer-compare  -Wno-pointer-to-int-cast
--Wno-pragmas  -Wno-prio-ctor-dtor  -Wredundant-decls
--Wrestrict  -Wno-return-local-addr  -Wreturn-type
+-Wno-pragmas  -Wno-pragma-once-outside-header  -Wno-prio-ctor-dtor
+-Wredundant-decls  -Wrestrict  -Wno-return-local-addr  -Wreturn-type
 -Wno-scalar-storage-order  -Wsequence-point
 -Wshadow  -Wshadow=global  -Wshadow=local  -Wshadow=compatible-local
 -Wno-shadow-ivar
@@ -7983,6 +7983,12 @@ Do not warn about misuses of pragmas, such as incorrect 
parameters,
 invalid syntax, or conflicts between pragmas.  See also
 @option{-Wunknown-pragmas}.
 
+@opindex Wno-pragma-once-outside-header
+@opindex Wpragma-once-outside-header
+@item -Wno-pragma-once-outside-header
+Do not warn when @code{#pragma once} is used in a file that is not a header
+file, such as a main file.
+
 @opindex Wno-prio-ctor-dtor
 @opindex Wprio-ctor-dtor
 @item -Wno-prio-ctor-dtor
diff --git a/gcc/testsuite/g++.dg/warn/Wno-pragma-once-outside-header.C 
b/gcc/testsuite/g++.dg/warn/Wno-pragma-once-outside-header.C
new file mode 100644
index 000..b5be4d25a9d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wno-pragma-once-outside-header.C
@@ -0,0 +1,5 @@
+// { dg-do assemble  }
+// { dg-options "-Wno-pragma-once-outside-header" }
+
+#pragma once
+int main() {}
diff --git a/gcc/testsuite/g++.dg/warn/Wpragma-once-outside-header.C 
b/gcc/testsuite/g++.dg/warn/Wpragma-once-outside-header.C
new file mode 100644
index 000..324b0638c3f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wpragma-once-outside-header.C
@@ -0,0 +1,6 @@
+// { dg-do assemble  }
+// { dg-options "-Werror=pragma-once-outside-header" }
+// { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 }
+
+#pragma once  // { dg-error "#pragma once in main file" }
+int main() {}
diff --git a/libcpp/directives.cc b/libcpp/directives.cc
index 479f8c716e8..467efdf637d 100644
--- a/libcpp/directives.cc
+++ b/libcpp/directives.cc
@@ -1589,7 +1589,8 @@ static void
 do_pragma_once (cpp_reader *pfile)
 {
   if 

[Bug ada/115507] New: 'Wide_Wide_Value failed for unicode strings

2024-06-15 Thread dramwang at 163 dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115507

Bug ID: 115507
   Summary: 'Wide_Wide_Value failed for unicode strings
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dramwang at 163 dot com
CC: dkm at gcc dot gnu.org
  Target Milestone: ---

For following code, CONSTRAINT_ERROR exception will be raised:

```
with Ada.Wide_Wide_Text_IO ;

procedure Sample is
   use Ada.Wide_Wide_Text_IO ;

   type T is (A, 乙) ;
begin
   Put_Line (A'Wide_Wide_Image) ;
   Put_Line (乙'Wide_Wide_Image) ;

   Put_Line (T (T'Wide_Wide_Value ("A"))'Wide_Wide_Image) ;
   Put_Line (T (T'Wide_Wide_Value ("乙"))'Wide_Wide_Image) ;
end Sample ;
```

Output:

```
A
乙  
   A

raised CONSTRAINT_ERROR : bad input for 'Value: "乙"
[./sample]
0x41cd20 System.Val_Util.Bad_Value at s-valuti.adb:61
0x41c6d9 System.Val_Enum_8.Impl.Value_Enumeration at s-valuen.adb:149
0x404a4d Sample at sample.adb:12
0x4046b7 Main at b~sample.adb:258
[/lib/x86_64-linux-gnu/libc.so.6]
0x7fc03814f248
0x7fc03814f303
[./sample]
0x4040ef _start at ???
0xfffe
```

'Wide_Value will also failed with the same error.

I've tested in Debian 12 x86_64 with GNAT 15.0.0 20240615 (git 079506).

Re: [PATCH v3] gcc, libcpp: Add warning switch for "#pragma once in main file" [PR89808]

2024-06-15 Thread Ken Matsui
On Thu, Jun 13, 2024 at 7:44 AM Jason Merrill  wrote:
>
> On 6/13/24 10:31, Ken Matsui wrote:
> > This patch adds a warning switch for "#pragma once in main file".  The
> > warning option name is Wpragma-once-outside-header, which is the same
> > as Clang.
> >
> >   PR preprocessor/89808
> >
> > gcc/c-family/ChangeLog:
> >
> >   * c.opt (Wpragma_once_outside_header): Define new option.
> >
> > gcc/ChangeLog:
> >
> >   * doc/invoke.texi (Warning Options): Document
> >   -Wno-pragma-once-outside-header.
> >
> > libcpp/ChangeLog:
> >
> >   * include/cpplib.h (struct cpp_options): Define
> >   cpp_warn_pragma_once_outside_header.
>
> This bit-field should be unneeded now, along with the uses of it.

Thank you!  I'll update the patch shortly.

>
> >   (cpp_warning_reason): Define CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER.
> >   * directives.cc (do_pragma_once): Use
> >   cpp_warn_pragma_once_outside_header and
> >   CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER.
> >   * init.cc (cpp_create_reader): Handle
> >   cpp_warn_pragma_once_outside_header.
> >
> > gcc/testsuite/ChangeLog:
> >
> >   * g++.dg/warn/Wno-pragma-once-outside-header.C: New test.
> >   * g++.dg/warn/Wpragma-once-outside-header.C: New test.
> >
> > Signed-off-by: Ken Matsui 
> > ---
> >   gcc/c-family/c.opt |  4 
> >   gcc/doc/invoke.texi| 10 --
> >   .../g++.dg/warn/Wno-pragma-once-outside-header.C   |  5 +
> >   .../g++.dg/warn/Wpragma-once-outside-header.C  |  6 ++
> >   libcpp/directives.cc   |  9 ++---
> >   libcpp/include/cpplib.h|  7 ++-
> >   libcpp/init.cc |  1 +
> >   7 files changed, 36 insertions(+), 6 deletions(-)
> >   create mode 100644 
> > gcc/testsuite/g++.dg/warn/Wno-pragma-once-outside-header.C
> >   create mode 100644 gcc/testsuite/g++.dg/warn/Wpragma-once-outside-header.C
> >
> > diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
> > index 403abc1f26e..3439f36fe45 100644
> > --- a/gcc/c-family/c.opt
> > +++ b/gcc/c-family/c.opt
> > @@ -1188,6 +1188,10 @@ Wpragmas
> >   C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning
> >   Warn about misuses of pragmas.
> >
> > +Wpragma-once-outside-header
> > +C ObjC C++ ObjC++ Var(warn_pragma_once_outside_header) 
> > CppReason(CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER) Init(1) Warning
> > +Warn about #pragma once outside of a header.
> > +
> >   Wprio-ctor-dtor
> >   C ObjC C++ ObjC++ Var(warn_prio_ctor_dtor) Init(1) Warning
> >   Warn if constructor or destructors with priorities from 0 to 100 are used.
> > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> > index 9456ced468a..c7f17ca9eb7 100644
> > --- a/gcc/doc/invoke.texi
> > +++ b/gcc/doc/invoke.texi
> > @@ -391,8 +391,8 @@ Objective-C and Objective-C++ Dialects}.
> >   -Wpacked  -Wno-packed-bitfield-compat  -Wpacked-not-aligned  -Wpadded
> >   -Wparentheses  -Wno-pedantic-ms-format
> >   -Wpointer-arith  -Wno-pointer-compare  -Wno-pointer-to-int-cast
> > --Wno-pragmas  -Wno-prio-ctor-dtor  -Wredundant-decls
> > --Wrestrict  -Wno-return-local-addr  -Wreturn-type
> > +-Wno-pragmas  -Wno-pragma-once-outside-header  -Wno-prio-ctor-dtor
> > +-Wredundant-decls  -Wrestrict  -Wno-return-local-addr  -Wreturn-type
> >   -Wno-scalar-storage-order  -Wsequence-point
> >   -Wshadow  -Wshadow=global  -Wshadow=local  -Wshadow=compatible-local
> >   -Wno-shadow-ivar
> > @@ -7983,6 +7983,12 @@ Do not warn about misuses of pragmas, such as 
> > incorrect parameters,
> >   invalid syntax, or conflicts between pragmas.  See also
> >   @option{-Wunknown-pragmas}.
> >
> > +@opindex Wno-pragma-once-outside-header
> > +@opindex Wpragma-once-outside-header
> > +@item -Wno-pragma-once-outside-header
> > +Do not warn when @code{#pragma once} is used in a file that is not a header
> > +file, such as a main file.
> > +
> >   @opindex Wno-prio-ctor-dtor
> >   @opindex Wprio-ctor-dtor
> >   @item -Wno-prio-ctor-dtor
> > diff --git a/gcc/testsuite/g++.dg/warn/Wno-pragma-once-outside-header.C 
> > b/gcc/testsuite/g++.dg/warn/Wno-pragma-once-outside-header.C
> > new file mode 100644
> > index 000..b5be4d25a9d
> > --- /dev/null
> > +++ b/gcc/testsuite/g++.dg/warn/Wno-pragma-once-outside-header.C
> > @@ -0,0 +1,5 @@
> > +// { dg-do assemble  }
> > +// { dg-options "-Wno-pragma-once-outside-header" }
> > +
> > +#pragma once
> > +int main() {}
> > diff --git a/gcc/testsuite/g++.dg/warn/Wpragma-once-outside-header.C 
> > b/gcc/testsuite/g++.dg/warn/Wpragma-once-outside-header.C
> > new file mode 100644
> > index 000..324b0638c3f
> > --- /dev/null
> > +++ b/gcc/testsuite/g++.dg/warn/Wpragma-once-outside-header.C
> > @@ -0,0 +1,6 @@
> > +// { dg-do assemble  }
> > +// { dg-options "-Werror=pragma-once-outside-header" }
> > +// { dg-message "some warnings being treated as errors" "" {target 
> > "*-*-*"} 0 }

Results for 12.3.1 20240615 [remotes/origin/releases/gcc-12 r12-10559-g573a5f33152] (GCC) testsuite on avr-unknown-none

2024-06-15 Thread The GnuPru BuildBot via Gcc-testresults
WARNING: Many C++ failures have been omitted due to lack of libstdc++ on AVR!
Only G++ regressions are reported below.


LAST_UPDATED: Sun Jun 16 00:22:50 UTC 2024 (revision r12-10559-g573a5f33152)

Target is avr-unknown-none
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target atmega128-sim
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -Os  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O0   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O0  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O1   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O1  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O3 -g   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O3 -g  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -Os   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O0   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O1   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O2   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O3 -g   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -Os   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/pr103813.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none 

Results for 11.4.1 20240615 [remotes/origin/releases/gcc-11 revision 08ee05b43a7:3ef077fba72:87abb9e4d9bb71a3e5257f418dd936db0b9a3fa5] (GCC) testsuite on avr-unknown-none

2024-06-15 Thread The GnuPru BuildBot via Gcc-testresults
e-ssa/pr91091-2.c scan-tree-dump-times fre1 " = [^;]*x;" 1
FAIL: gcc.dg/tree-ssa/pr91482.c scan-tree-dump-times ccp1 
"__builtin_assume_aligned" 1
FAIL: gcc.dg/tree-ssa/pr92085-2.c (internal compiler error)
FAIL: gcc.dg/tree-ssa/pr92085-2.c (test for excess errors)
UNRESOLVED: gcc.dg/tree-ssa/pr93118.c scan-tree-dump-not optimized "<<"
UNRESOLVED: gcc.dg/tree-ssa/pr93118.c scan-tree-dump-not optimized ">>"
FAIL: gcc.dg/tree-ssa/pr93435.c (test for excess errors)
FAIL: gcc.dg/tree-ssa/pr96730.c (test for excess errors)
FAIL: gcc.dg/tree-ssa/pr99578-1.c scan-tree-dump-times optimized "PHI 
<-?1([0-9]+), -?1([0-9]+)>" 2
XPASS: gcc.dg/tree-ssa/ssa-fre-26.c scan-tree-dump fre1 "Replaced u.i with 0 in"
FAIL: gcc.dg/tree-ssa/ssa-fre-69.c scan-tree-dump fre1 "return 145;"
FAIL: gcc.dg/tree-ssa/ssa-fre-84.c scan-tree-dump fre1 
"*dst_[0-9]*(D) = { 1, 0, 2, 3 };"
FAIL: gcc.dg/tree-ssa/ssa-hoist-4.c scan-tree-dump-times optimized "= *" 2
FAIL: gcc.dg/tree-ssa/ssa-hoist-4.c scan-tree-dump-times optimized "MAX_EXPR" 1

=== gcc Summary ===

# of expected passes108304
# of unexpected failures445
# of unexpected successes   13
# of expected failures  599
# of untested testcases 8
# of unresolved testcases   17
# of unsupported tests  5184
/home/dinux/projects/pru/testbot-workspace/avr-gcc-build/gcc/xgcc  version 
11.4.1 20240615 [remotes/origin/releases/gcc-11 revision 
08ee05b43a7:3ef077fba72:87abb9e4d9bb71a3e5257f418dd936db0b9a3fa5] (GCC) 

Host   is x86_64-pc-linux-gnu

=== g++ tests ===


Running target atmega128-sim
XPASS: g++.dg/analyzer/pr94028.C  -std=c++98  (test for bogus messages, line 22)
FAIL: g++.dg/coroutines/co-await-initlist1.C (test for excess errors)
FAIL: g++.dg/coroutines/co-await-moveonly1.C (test for excess errors)
FAIL: g++.dg/coroutines/pr102454.C (test for excess errors)
FAIL: g++.dg/coroutines/pr103328.C (test for excess errors)
FAIL: g++.dg/coroutines/pr106188.C (test for excess errors)
UNRESOLVED: g++.dg/coroutines/pr106188.C compilation failed to produce 
executable
FAIL: g++.dg/coroutines/pr95520.C (test for excess errors)
UNRESOLVED: g++.dg/coroutines/pr95520.C compilation failed to produce executable
XPASS: c-c++-common/Wrestrict.c  -std=gnu++14 pr79220 (test for warnings, line 
198)
XPASS: c-c++-common/Wrestrict.c  -std=gnu++14 pr79220 (test for warnings, line 
205)
XPASS: c-c++-common/Wrestrict.c  -std=gnu++14 pr79220 (test for warnings, line 
210)
XPASS: c-c++-common/Wrestrict.c  -std=gnu++17 pr79220 (test for warnings, line 
198)
XPASS: c-c++-common/Wrestrict.c  -std=gnu++17 pr79220 (test for warnings, line 
205)
XPASS: c-c++-common/Wrestrict.c  -std=gnu++17 pr79220 (test for warnings, line 
210)
XPASS: c-c++-common/Wrestrict.c  -std=gnu++2a pr79220 (test for warnings, line 
198)
XPASS: c-c++-common/Wrestrict.c  -std=gnu++2a pr79220 (test for warnings, line 
205)
XPASS: c-c++-common/Wrestrict.c  -std=gnu++2a pr79220 (test for warnings, line 
210)
XPASS: c-c++-common/Wrestrict.c  -std=gnu++98 pr79220 (test for warnings, line 
198)
XPASS: c-c++-common/Wrestrict.c  -std=gnu++98 pr79220 (test for warnings, line 
205)
XPASS: c-c++-common/Wrestrict.c  -std=gnu++98 pr79220 (test for warnings, line 
210)
FAIL: g++.dg/cpp0x/decltype-bitfield1.C  -std=c++14 (test for excess errors)
FAIL: g++.dg/cpp0x/decltype-bitfield1.C  -std=c++17 (test for excess errors)
FAIL: g++.dg/cpp0x/decltype-bitfield1.C  -std=c++2a (test for excess errors)
FAIL: g++.dg/cpp0x/decltype-bitfield2.C  -std=c++14 (test for excess errors)
FAIL: g++.dg/cpp0x/decltype-bitfield2.C  -std=c++17 (test for excess errors)
FAIL: g++.dg/cpp0x/decltype-bitfield2.C  -std=c++2a (test for excess errors)
FAIL: g++.dg/cpp0x/initlist-new6.C  -std=c++14 (test for excess errors)
UNRESOLVED: g++.dg/cpp0x/initlist-new6.C  -std=c++14 compilation failed to 
produce executable
FAIL: g++.dg/cpp0x/initlist-new6.C  -std=c++17 (test for excess errors)
UNRESOLVED: g++.dg/cpp0x/initlist-new6.C  -std=c++17 compilation failed to 
produce executable
FAIL: g++.dg/cpp0x/initlist-new6.C  -std=c++2a (test for excess errors)
UNRESOLVED: g++.dg/cpp0x/initlist-new6.C  -std=c++2a compilation failed to 
produce executable
FAIL: g++.dg/cpp0x/initlist124.C  -std=c++14 (test for excess errors)
FAIL: g++.dg/cpp0x/initlist124.C  -std=c++17 (test for excess errors)
FAIL: g++.dg/cpp0x/initlist124.C  -std=c++2a (test for excess errors)
FAIL: g++.dg/cpp1z/aligned-new9.C  -std=c++17 (test for excess errors)
UNRESOLVED: g++.dg/cpp1z/aligned-new9.C  -std=c++17 compilation failed to 
produce executable
FAIL: g++.dg/cpp1z/aligned-new9.C  -std=c++2a (test for excess errors)
UNRESOLVED: g++.dg/cpp1z/aligned-new9.C  -std=c++2a compilation failed to 
produce executable
FAIL: g++.dg/cpp1z/constexpr-array2.C  -std=c++14  (test for errors, line 11)
FAIL: g++.

[Bug target/115475] AArch64 should define __ARM_FEATURE_SVE_BF16 when appropriate

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115475

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=115457
 Ever confirmed|0   |1
   Last reconfirmed||2024-06-16

[Bug target/108316] ICE in maybe_gen_insn via expand_SCATTER_STORE when vectorizing for SVE since r13-2737-g4a773bf2f08656

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108316

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|13.4|---

[Bug target/115087] dead block not eliminated in SVE intrinsics code

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115087

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
   Keywords||aarch64-sve
 CC||pinskia at gcc dot gnu.org

[Bug target/113859] popcount HI can be vectorized for non-SVE

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113859

--- Comment #4 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #3)
> Patch was posted:
> https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650311.html

Latest patch:
https://gcc.gnu.org/pipermail/gcc-patches/2024-June/653405.html

[Bug target/100211] [11/12/13/14/15 Regression] aarch64: OOB accesses in aarch64_{save,restore}_callee_saves

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100211

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||aarch64-sve
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org
 Status|NEW |ASSIGNED

--- Comment #5 from Andrew Pinski  ---
Let me take a look at this.

[Bug target/106329] No optimization for SVE pfalse predicate

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106329

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug tree-optimization/97405] ICE in get_or_alloc_expr_for in code hoisting with SVE intrinsics

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97405

Andrew Pinski  changed:

   What|Removed |Added

  Known to work||15.0

--- Comment #6 from Andrew Pinski  ---
Fixed on the trunk, I suspect r15-917-gc9842f99042454 fixed it.
That revision is explictly fixing `POLY_INT_CST [16, 16] /[ex] 16` case too.

I think we should just add the testcase and close it as fixed.

[Bug target/111733] Emit inline SVE FSCALE instruction for ldexp

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111733

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||aarch64-sve
   Last reconfirmed||2024-06-15
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #1 from Andrew Pinski  ---
Confirmed.

[Bug target/114906] aarch64 locally_streaming ICE with -fstack-clash-protection in aarch64_expand_prologue

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114906

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2024-06-15
Summary|aarch64 locally_streaming   |aarch64 locally_streaming
   |ICE in  |ICE with
   |aarch64_expand_prologue |-fstack-clash-protection in
   ||aarch64_expand_prologue
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
Confirmed.

Results for 12.3.1 20240613 [releases/gcc-12 revision r12-10557-g6693b1f39297] (GCC) testsuite on x86_64-apple-darwin10

2024-06-15 Thread Iain Sandoe via Gcc-testresults
LAST_UPDATED: Thu 13 Jun 2024 00:19:51 UTC (revision r12-10557-g6693b1f39297)

=== acats tests ===

=== acats Summary ===
# of expected passes2328
# of unexpected failures0
Native configuration is x86_64-apple-darwin10

=== g++ tests ===


Running target unix/-m32
FAIL: g++.dg/ext/pr84828.C  -std=gnu++14 (test for excess errors)
FAIL: g++.dg/ext/pr84828.C  -std=gnu++17 (test for excess errors)
FAIL: g++.dg/ext/pr84828.C  -std=gnu++20 (test for excess errors)
FAIL: g++.dg/ext/pr84828.C  -std=gnu++98 (test for excess errors)
FAIL: g++.dg/init/array61.C  -std=c++14  scan-tree-dump-times gimple 
"item::item" 1
FAIL: g++.dg/init/array61.C  -std=c++17  scan-tree-dump-times gimple 
"item::item" 1
FAIL: g++.dg/init/array61.C  -std=c++20  scan-tree-dump-times gimple 
"item::item" 1
FAIL: g++.dg/ipa/pr67056.C   scan-ipa-dump cp "Speculative outer type:struct 
CompositeClass"
WARNING: c-c++-common/gomp/loop-1.c  -std=c++20  (test for errors, line 85) 
program timed out.
FAIL: g++.dg/lto/pr65276 cp_lto_pr65276_0.o-cp_lto_pr65276_1.o link, -flto -O0 
-std=c++11
FAIL: g++.dg/lto/pr85405 cp_lto_pr85405_0.o-cp_lto_pr85405_1.o link, -fPIC 
-shared -flto
FAIL: g++.dg/lto/pr85405b cp_lto_pr85405b_0.o-cp_lto_pr85405b_1.o link, -fPIC 
-shared -flto
FAIL: g++.dg/lto/pr85655 cp_lto_pr85655_0.o-cp_lto_pr85655_0.o link, -O2 -fPIC 
-shared -flto
FAIL: g++.dg/lto/pr86523-3 cp_lto_pr86523-3_0.o-cp_lto_pr86523-3_0.o link,  
-fPIC -flto -g -shared 
FAIL: g++.dg/lto/pr86585 cp_lto_pr86585_0.o-cp_lto_pr86585_1.o link,  -flto -g 
-nostdlib -shared -fPIC 
FAIL: g++.dg/lto/pr87295 cp_lto_pr87295_0.o assemble,  -flto -ffat-lto-objects 
-fdebug-types-section -g -std=gnu++17 
FAIL: g++.dg/lto/pr87906 cp_lto_pr87906_0.o-cp_lto_pr87906_1.o link,  -O -fPIC 
-flto 
FAIL: g++.dg/lto/pr88046 cp_lto_pr88046_0.o-cp_lto_pr88046_0.o link,  -O2 -fPIC 
-flto 
FAIL: g++.dg/lto/pr88758 cp_lto_pr88758_0.o-cp_lto_pr88758_1.o link,  -O3 -fPIC 
-flto -shared 
FAIL: g++.dg/lto/pr89330 cp_lto_pr89330_0.o-cp_lto_pr89330_1.o link,  -O3 -g 
-flto -shared -fPIC -Wno-odr 
FAIL: g++.dg/lto/pr91574 cp_lto_pr91574_0.o-cp_lto_pr91574_0.o link,  -fPIC 
-flto -O2 
FAIL: g++.dg/lto/pr92609  (test for LTO warnings, pr92609_0.C line 75)
FAIL: g++.dg/lto/pr92609 cp_lto_pr92609_0.o-cp_lto_pr92609_1.o link,  -fPIC 
-flto 
FAIL: g++.dg/lto/pr93166 cp_lto_pr93166_0.o-cp_lto_pr93166_0.o link,  -fPIC -O2 
-flto -fvisibility=hidden 
FAIL: g++.dg/tls/thread_local-order2.C  -std=c++14 execution test
FAIL: g++.dg/tls/thread_local-order2.C  -std=c++17 execution test
FAIL: g++.dg/tls/thread_local-order2.C  -std=c++20 execution test
FAIL: g++.dg/tls/thread_local13.C  -std=gnu++14 execution test
FAIL: g++.dg/tls/thread_local13.C  -std=gnu++17 execution test
FAIL: g++.dg/tls/thread_local13.C  -std=gnu++20 execution test
FAIL: g++.dg/tls/thread_local14.C  -std=gnu++14 execution test
FAIL: g++.dg/tls/thread_local14.C  -std=gnu++17 execution test
FAIL: g++.dg/tls/thread_local14.C  -std=gnu++20 execution test
WARNING: g++.dg/torture/pr54735.C   -O3 -g  (test for excess errors) program 
timed out.
FAIL: g++.dg/torture/pr54735.C   -O3 -g  (test for excess errors)
FAIL: g++.target/i386/pr90424-1.C  -std=gnu++14  scan-tree-dump-times optimized 
"BIT_INSERT_EXPR" 9
FAIL: g++.target/i386/pr90424-1.C  -std=gnu++14  scan-tree-dump-times optimized 
"MEM" 9
FAIL: g++.target/i386/pr90424-1.C  -std=gnu++17  scan-tree-dump-times optimized 
"BIT_INSERT_EXPR" 9
FAIL: g++.target/i386/pr90424-1.C  -std=gnu++17  scan-tree-dump-times optimized 
"MEM" 9
FAIL: g++.target/i386/pr90424-1.C  -std=gnu++20  scan-tree-dump-times optimized 
"BIT_INSERT_EXPR" 9
FAIL: g++.target/i386/pr90424-1.C  -std=gnu++20  scan-tree-dump-times optimized 
"MEM" 9
FAIL: g++.target/i386/pr90424-2.C  -std=gnu++14  scan-tree-dump-times optimized 
"BIT_INSERT_EXPR" 9
FAIL: g++.target/i386/pr90424-2.C  -std=gnu++14  scan-tree-dump-times optimized 
"MEM" 9
FAIL: g++.target/i386/pr90424-2.C  -std=gnu++17  scan-tree-dump-times optimized 
"BIT_INSERT_EXPR" 9
FAIL: g++.target/i386/pr90424-2.C  -std=gnu++17  scan-tree-dump-times optimized 
"MEM" 9
FAIL: g++.target/i386/pr90424-2.C  -std=gnu++20  scan-tree-dump-times optimized 
"BIT_INSERT_EXPR" 9
FAIL: g++.target/i386/pr90424-2.C  -std=gnu++20  scan-tree-dump-times optimized 
"MEM" 9

=== g++ Summary for unix/-m32 ===

# of expected passes218539
# of unexpected failures45
# of expected failures  2077
# of unsupported tests  10218

Running target unix/-m64
WARNING: g++.dg/cpp0x/initlist108.C  -std=gnu++17 (test for excess errors) 
program timed out.
FAIL: g++.dg/cpp0x/initlist108.C  -std=gnu++17 (test for excess errors)
WARNING: g++.dg/cpp0x/vt-51314.C  -std=c++14  (test for errors, line 6) program 
timed out.
FAIL: g++.dg/init/array61.C  -std=c++14  scan-tree-dump-times gimple 
"item::item" 1
FAIL: g++.dg/init/array61.C  -std=c++17  scan-tree-dump-times gimple 
"item::item" 1
FAIL: 

gcc-14-20240615 is now available

2024-06-15 Thread GCC Administrator via Gcc
Snapshot gcc-14-20240615 is now available on
  https://gcc.gnu.org/pub/gcc/snapshots/14-20240615/
and on various mirrors, see https://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 14 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch 
releases/gcc-14 revision 3fe255fd3f9b7f93c69d11d4bb0963793fc5edd4

You'll find:

 gcc-14-20240615.tar.xz   Complete GCC

  SHA256=e467196b1515a4fe03673b9d25299a7072e7965dac4ab65e8e6e6af65167edab
  SHA1=e9feacbc52dfdc1fd86debc95416a617ff780084

Diffs from 14-20240608 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-14
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.


Results for 12.3.1 20240615 [remotes/origin/releases/gcc-12 r12-10559-g573a5f3315] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-06-15 Thread Bill Seurer (POWER8) via Gcc-testresults
/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.j == 14
FAIL: gcc.dg/torture/pr52451.c   -O0  execution test
FAIL: gcc.dg/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
FAIL: gcc.dg/torture/pr91323.c   -O0  execution test
FAIL: gcc.dg/torture/pr91323.c   -O1  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr91323.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr91323.c   -Os  execution test
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.target/powerpc/pr56605.c scan-rtl-dump-times combine "(compare:CC 
((?:and|zero_extend):(?:[SD]I) ((?:sub)?reg:[SD]I" 1
FAIL: gcc.target/powerpc/pr86731-fwrapv-longlong.c scan-assembler-times 
mp?lxvM|mlxvM|mlxvd2xM|mxxspltidpM 2
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
FAIL: gcc.target/powerpc/rs6000-fpint.c scan-assembler-not stfiwx
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes162461
# of unexpected failures170
# of unexpected successes   14
# of expected failures  1468
# of unsupported tests  3909
/home/gccbuild/build/nightly/build-gcc-12/gcc/xgcc  version 12.3.1 20240615 
[remotes/origin/releases/gcc-12 r12-10559-g573a5f3315] (GCC) 

=== gfortran tests ===


Running target unix
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O0  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O1  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O2  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -Os  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O0  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O1  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O2  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -Os  execution test

=== gfortran Summary ===

# of expected passes66426
# of unexpected failures6
# of unexpected successes   6
# of expected failures  284
# of unsupported tests  190
/home/gccbuild/build/nightly/build-gcc-12/gcc/gfortran  version 12.3.1 20240615 
[remotes/origin/releases/gcc-12 r12-10559-g573a5f3315] (GCC) 

=== g++ tests ===


Running target unix

=== g++ Summary ===

# of expected passes228604
# of expected failures  1930
# of unsupported tests  10565
/home/gccbuild/build/nightly/build-gcc-12/gcc/xg++  version 12.3.1 20240615 
[remotes/origin/releases/gcc-12 r12-10559-g573a5f3315] (GCC) 

=== obj-c++ tests ===


Running target unix

=== obj-c++ Summary ===

# of expected passes1502
# of expected failures  10
# of unsupported tests  79
/home/gccbuild/build/nightly/build-gcc-12/gcc/xg++  version 12.3.1 20240615 
[remotes/origin/relea

Results for 13.3.1 20240614 [releases/gcc-13 r13-8849-g24dbdd20dc] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-06-15 Thread Bill Seurer (POWER9) via Gcc-testresults


git commit g:24dbdd20dcbd4c560f852cce51aa0754464476f5
gcc-descr r13-8849-g24dbdd20dcbd4c

power9
Linux 5.15.0-107-generic ppc64le
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.2
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Fri Jun 14 23:05:51 UTC 2024 (revision r13-8849-g24dbdd20dc)

Native configuration is powerpc64le-unknown-linux-gnu

=== gcc tests ===


Running target unix
XPASS: gcc.dg/Wtrampolines.c standard descriptors (test for warnings, line 29)
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -Os  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/inline-params.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
XPASS: gcc.dg/guality/inline-params.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/ipa-sra-1.c   -O0  line 15 k == 3
XPASS: gcc.dg/guality/ipa-sra-1.c   -O1  -DPREVENT_OPTIMIZATION  line 15 k == 3
XPASS: gcc.dg/guality/ipa-sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 15 k == 3
FAIL: gcc.dg/guality/loop-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 y == 2
FAIL: gcc.dg/guality/pr36728-3.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr36728-3.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i == 37
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i1 == 2 * 
37
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i2 == 3 * 
37
XPASS: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 j == 28 
+ 37
FAIL: gcc.dg/guality/pr54200.c   -O1  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O2  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -Os  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 y == 25
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 z == 6
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 23 y == 117
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 23 z == 8
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 y == 25
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 z == 6
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 23 y == 117
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 23 z == 8
FAIL: gcc.dg/guality/pr54519-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 17 y == 25
FAIL: 

[Bug web/115391] Suggest add current size of git repository to git page

2024-06-15 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115391

Eric Gallager  changed:

   What|Removed |Added

 CC||egallager at gcc dot gnu.org

--- Comment #7 from Eric Gallager  ---
Tips for doing this with the GitHub mirror of it:
https://stackoverflow.com/questions/8646517/how-can-i-see-the-size-of-a-github-repository-before-cloning-it

[Bug rtl-optimization/115505] missing optimization: thumb1 use ldmia/stmia for load store DI/DF data when possible

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115505

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

Re: [PATCH] libstdc++: Fix build for AVR [PR115481, PR111639]

2024-06-15 Thread Detlef Vollmann

On 6/15/24 10:30, Georg-Johann Lay wrote:

Am 14.06.24 um 21:11 schrieb Detlef Vollmann:
I actually plan anyway to run a test with the built libstdc++ on 
simulavr.



As an aside, simulavr tries to simulate an exact match of the hardware
including internal I/O like timers, IRQs, etc.

For GCC regression testing, no internal I/O is needed; all what's
required for testing algorithms is a core simulator like avrtest:

https://github.com/sprintersb/atest

https://github.com/sprintersb/atest?tab=readme-ov-file#running-the-avr-gcc-testsuite-using-the-avrtest-simulator

avrtest runs orders of magnitude faster than simulavr, however it
doesn't implement a GDB server, EEPROM or timers (none of which
is required for the GCC testsuite).


Thanks for the pointer.


Apart from that, only being a core simulator, you can test for more
cores than covered by simulavr.  simulavr supports devices that cover
the following 8 multilib variants:

avr2
tiny-stack
avr25
avr25/tiny-stack
avr4
avr5
avr51
avr6

out of the 19 variants available in avr-gcc, like avr3, avr31,
avrtiny, and all the avrxmega[2-7] variants that can be used with
avrtest.


avr-gcc 15 actually has 57 multilib variants (long-double32,
double64 and short-calls versions).

avr-libc 2.2.0 uses -print-multi-lib to build them all,
avr-libc 2.0.0 has only 17 variants hardcoded.

But right now I'm fighting against an ICE in cmath, i.e. so far
any tests of cmath fail...

I'll investigate this tomorrow and decide then what I'll do...

  Detlef



[Bug bootstrap/112422] Build process does a redundant number of checks ?

2024-06-15 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112422

--- Comment #4 from Eric Gallager  ---
(In reply to Sam James from comment #3)
> There's some stuff we could cache for sure but it wouldn't be the majority
> of the checks - stuff like finding tools like awk, sed should work
> regardless of which stage we're in and so on.

gawk and sed were potential host modules at one point previously, too, but it
looks like they've been removed, so yeah I guess it'd be safe for them now...
anything that might fall in this category should get checked against
Makefile.def to make sure there aren't already potential modules for them for
people trying to combine trees or something...

Re: [PATCH] DOCUMENTATION_ROOT_URL vs. release branches [PR114738]

2024-06-15 Thread Jakub Jelinek
On Sat, Jun 15, 2024 at 09:47:04PM +0200, Gerald Pfeifer wrote:
> There should be *very* few user visible changes such as new options or 
> substantially different behaviors on release branches - pretty much by 
> definition.

In reality there are tons of changes, people add new options even on release
branches all the time.

So I think it is very useful to have separate documentation for the separate
releases.

Jakub



Re: [PATCH] DOCUMENTATION_ROOT_URL vs. release branches [PR114738]

2024-06-15 Thread Gerald Pfeifer
On Tue, 23 Apr 2024, David Malcolm wrote:
> My hope is that the URL suffixes don't change: we shouldn't be adding
> new command-line options on the release branches, and I'd hope that
> texinfo doesn't change the generated anchors from run to run.

Already before this thread, but definitely now, I started to wonder 
whether we shouldn't fundamentally change our approach on online 
documentation for release branches.

My proposal is to have only one version per release branch online,
that is, not https://gcc.gnu.org/onlinedocs/gcc-14.1.0 and
https://gcc.gnu.org/onlinedocs/gcc-14.2.0 and so forth, rather just

  https://gcc.gnu.org/onlinedocs/gcc-14

There should be *very* few user visible changes such as new options or 
substantially different behaviors on release branches - pretty much by 
definition.

So why not have one version of the documentation per release branch where 
users of 14.1 get documentation fixes/improvements made for later in the
branch?

And it would vastly simplify things in terms of creating docs - simply 
build them once a day, no changes for point releases... (and much, much
less duplication).

What do you think?

Gerald


[Bug pch/115312] [14/15 Regression] ICE when including a PCH via compiler option -include

2024-06-15 Thread brechtsanders at users dot sourceforge.net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115312

--- Comment #6 from Brecht Sanders  
---
You're right. Sorry I missed that.

Results for 15.0.0 20240615 (experimental) [master revision gcc-15-1352-g079506b8aaf] (GCC) testsuite on aarch64-unknown-linux-gnu

2024-06-15 Thread ci_notify--- via Gcc-testresults
ction-bodies g8
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align16.c check-function-bodies g8p
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align8.c check-function-bodies g1
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align8.c check-function-bodies g16
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align8.c check-function-bodies g16p
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align8.c check-function-bodies g1p
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align8.c check-function-bodies g8
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align8.c check-function-bodies g8p
FAIL: gcc.target/aarch64/bitint-args.c check-function-bodies f127
FAIL: gcc.target/aarch64/bitint-args.c check-function-bodies f65
FAIL: gcc.target/aarch64/ccmp_3.c scan-assembler-not \\tcbnz\\t
XPASS: gcc.target/aarch64/pr100056.c scan-assembler-not 
t[us]bfiztw[0-9]+, w[0-9]+, 11
FAIL: gcc.target/aarch64/pr100056.c scan-assembler-times 
t[us]bfiztw[0-9]+, w[0-9]+, 11 2
FAIL: gcc.target/aarch64/pr100056.c scan-assembler-times taddtw[0-9]+, 
w[0-9]+, w[0-9]+, uxtbn 2
FAIL: gcc.target/aarch64/pr108840.c scan-assembler-not andtw[0-9]+, 
w[0-9]+, 31
FAIL: gcc.target/aarch64/pr112105.c scan-assembler-not tdupt
FAIL: gcc.target/aarch64/pr112105.c scan-assembler-times 
(?n)tfmult.*v[0-9]+.s[0]n 2
FAIL: gcc.target/aarch64/pr99873_2.c scan-assembler-not tld4t
FAIL: gcc.target/aarch64/pr99873_2.c scan-assembler-not tst4t
FAIL: gcc.target/aarch64/rev16_2.c scan-assembler-times rev16tx[0-9]+ 2
FAIL: gcc.target/aarch64/vaddX_high_cost.c scan-assembler-not dupt
FAIL: gcc.target/aarch64/vmul_element_cost.c scan-assembler-not dupt
FAIL: gcc.target/aarch64/vmul_high_cost.c scan-assembler-not dupt
FAIL: gcc.target/aarch64/vsubX_high_cost.c scan-assembler-not dupt
FAIL: gcc.target/aarch64/sve/dot_1.c scan-assembler-times twhilelot 8
FAIL: gcc.target/aarch64/sve/pr96357.c scan-assembler 
tfsubrtz[0-9]+.d, p[0-7]/m, z[0-9]+.d, #1.0
FAIL: gcc.target/aarch64/sve/pr96357.c scan-assembler tmovprfxtz[0-9]+, 
z[0-9]+
FAIL: gcc.target/aarch64/sve/pr98119.c scan-assembler tandtx[0-9]+, 
x[0-9]+, #?-31n
FAIL: gcc.target/aarch64/sve/pre_cond_share_1.c scan-tree-dump-times optimized 
".COND_MUL" 1
XPASS: gcc.target/aarch64/sve/pre_cond_share_1.c scan-tree-dump-times optimized 
".VCOND" 1
FAIL: gcc.target/aarch64/sve/pred-not-gen-1.c scan-assembler-not tbict
FAIL: gcc.target/aarch64/sve/pred-not-gen-1.c scan-assembler-times 
tnottp[0-9]+.b, p[0-9]+/z, p[0-9]+.bn 1
FAIL: gcc.target/aarch64/sve/pred-not-gen-4.c scan-assembler-not tbict
FAIL: gcc.target/aarch64/sve/pred-not-gen-4.c scan-assembler-times 
tnottp[0-9]+.b, p[0-9]+/z, p[0-9]+.bn 1
FAIL: gcc.target/aarch64/sve/sad_1.c scan-assembler-times 
tudottz[0-9]+.d, z[0-9]+.h, z[0-9]+.hn 2
FAIL: gcc.target/aarch64/sve/sad_1.c scan-assembler-times 
tudottz[0-9]+.s, z[0-9]+.b, z[0-9]+.bn 2
FAIL: gcc.target/aarch64/sve/var_stride_2.c scan-assembler-times 
tubfiztx[0-9]+, x2, 10, 16n 1
FAIL: gcc.target/aarch64/sve/var_stride_2.c scan-assembler-times 
tubfiztx[0-9]+, x3, 10, 16n 1
FAIL: gcc.target/aarch64/sve/var_stride_4.c scan-assembler-times 
tsbfiztx[0-9]+, x2, 10, 32n 1
FAIL: gcc.target/aarch64/sve/var_stride_4.c scan-assembler-times 
tsbfiztx[0-9]+, x3, 10, 32n 1

=== gcc Summary ===

# of expected passes345336
# of unexpected failures61
# of unexpected successes   2
# of expected failures  1904
# of unsupported tests  4404
/home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/builds/destdir/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc
  version 15.0.0 20240615 (experimental) [master revision 
gcc-15-1352-g079506b8aaf] (GCC) 

=== gfortran tests ===


Running target tcwg-local
FAIL: gfortran.dg/vect/vect-8.f90   -O   scan-tree-dump-times vect "vectorized 
2[45] loops" 1

=== gfortran Summary ===

# of expected passes69657
# of unexpected failures1
# of expected failures  263
# of unsupported tests  156
/home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/builds/destdir/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gfortran
  version 15.0.0 20240615 (experimental) [master revision 
gcc-15-1352-g079506b8aaf] (GCC) 

=== g++ tests ===


Running target tcwg-local

=== g++ Summary ===

# of expected passes419320
# of expected failures  3006
# of unsupported tests  12265
/home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/builds/destdir/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-g++
  version 15.0.0 20240615 (experimental) [master revision 
gcc-15-1352-g079506b8aaf] (GCC) 

=== ob

Results for 13.3.1 20240615 [releases/gcc-13 r13-8850-g072e71f077] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-06-15 Thread Bill Seurer (POWER8) via Gcc-testresults
: gcc.dg/guality/pr56154-1.c  -Og -DPREVENT_OPTIMIZATION  line 
pr56154-1.c:20 x.a == 6
FAIL: gcc.dg/guality/pr59776.c  -Og -DPREVENT_OPTIMIZATION  line pr59776.c:17 
s1.f == 5.0
FAIL: gcc.dg/guality/pr59776.c  -Og -DPREVENT_OPTIMIZATION  line pr59776.c:17 
s1.g == 6.0
FAIL: gcc.dg/guality/pr59776.c  -Og -DPREVENT_OPTIMIZATION  line pr59776.c:17 
s2.f == 0.0
FAIL: gcc.dg/guality/pr59776.c  -Og -DPREVENT_OPTIMIZATION  line pr59776.c:20 
s1.f == 5.0
FAIL: gcc.dg/guality/pr59776.c  -Og -DPREVENT_OPTIMIZATION  line pr59776.c:20 
s1.g == 6.0
FAIL: gcc.dg/guality/pr59776.c  -Og -DPREVENT_OPTIMIZATION  line pr59776.c:20 
s2.f == 5.0
FAIL: gcc.dg/guality/pr68860-1.c   -O2  -DPREVENT_OPTIMIZATION  line 16 y == 2
FAIL: gcc.dg/guality/pr68860-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/pr68860-1.c   -Os  -DPREVENT_OPTIMIZATION  line 16 y == 2
FAIL: gcc.dg/guality/pr68860-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 21 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.j == 14
FAIL: gcc.dg/torture/pr52451.c   -O0  execution test
FAIL: gcc.dg/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
FAIL: gcc.dg/torture/pr91323.c   -O0  execution test
FAIL: gcc.dg/torture/pr91323.c   -O1  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr91323.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr91323.c   -Os  execution test
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.target/powerpc/pr105586.c (test for excess errors)
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
FAIL: gcc.target/powerpc/rs6000-fpint.c scan-assembler-not stfiwx
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes169276
# of unexpected failures127
# of unexpected successes   16
# of expected failures  1544
# of unsupported tests  4000
/home/gccbuild/build/nightly/build-gcc-13/gcc/xgcc  version 13.3.1 20240615 
[releases/gcc-13 r13-8850-g072e71f077] (GCC) 

=== gfortran tests ===


Running target unix
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O0  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O1  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O2  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -Os  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O0  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O1  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O2  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O3 -f

Results for 15.0.0 20240614 (experimental) [master r15-1347-ge5e341243bf4a8] (GCC) testsuite on m68k-unknown-linux-gnu

2024-06-15 Thread Andreas Schwab
]*, 4, 0, 0);" 1
FAIL: c-c++-common/gomp/atomic-28.c  -std=c++20  scan-tree-dump-times ompexp 
".ATOMIC_COMPARE_EXCHANGE ([^\\n\\r]*, 4, 5, 5);" 1
FAIL: c-c++-common/gomp/atomic-28.c  -std=c++20  scan-tree-dump-times ompexp 
".ATOMIC_COMPARE_EXCHANGE ([^\\n\\r]*, 4, 4, 2);" 1
FAIL: c-c++-common/gomp/atomic-28.c  -std=c++20  scan-tree-dump-times ompexp 
".ATOMIC_COMPARE_EXCHANGE ([^\\n\\r]*, 260, 5, 0);" 1
FAIL: c-c++-common/gomp/atomic-28.c  -std=c++20  scan-tree-dump-times ompexp 
".ATOMIC_COMPARE_EXCHANGE ([^\\n\\r]*, 4, 0, 0);" 1
FAIL: c-c++-common/gomp/atomic-3.c  -std=gnu++98  scan-tree-dump-times ompexp 
"xyzzy, 4" 1
FAIL: c-c++-common/gomp/atomic-3.c  -std=gnu++14  scan-tree-dump-times ompexp 
"xyzzy, 4" 1
FAIL: c-c++-common/gomp/atomic-3.c  -std=gnu++17  scan-tree-dump-times ompexp 
"xyzzy, 4" 1
FAIL: c-c++-common/gomp/atomic-3.c  -std=gnu++20  scan-tree-dump-times ompexp 
"xyzzy, 4" 1
FAIL: c-c++-common/gomp/atomic-9.c  -std=gnu++98  scan-tree-dump-times ompexp 
"__atomic_fetch_add" 1
FAIL: c-c++-common/gomp/atomic-9.c  -std=gnu++14  scan-tree-dump-times ompexp 
"__atomic_fetch_add" 1
FAIL: c-c++-common/gomp/atomic-9.c  -std=gnu++17  scan-tree-dump-times ompexp 
"__atomic_fetch_add" 1
FAIL: c-c++-common/gomp/atomic-9.c  -std=gnu++20  scan-tree-dump-times ompexp 
"__atomic_fetch_add" 1
FAIL: c-c++-common/gomp/unroll-4.c  -std=c++98  scan-assembler-times dummy 8
FAIL: c-c++-common/gomp/unroll-4.c  -std=c++14  scan-assembler-times dummy 8
FAIL: c-c++-common/gomp/unroll-4.c  -std=c++17  scan-assembler-times dummy 8
FAIL: c-c++-common/gomp/unroll-4.c  -std=c++20  scan-assembler-times dummy 8
FAIL: c-c++-common/gomp/unroll-5.c  -std=c++98  scan-assembler-times dummy 8
FAIL: c-c++-common/gomp/unroll-5.c  -std=c++14  scan-assembler-times dummy 8
FAIL: c-c++-common/gomp/unroll-5.c  -std=c++17  scan-assembler-times dummy 8
FAIL: c-c++-common/gomp/unroll-5.c  -std=c++20  scan-assembler-times dummy 8

=== g++ Summary ===

# of expected passes250315
# of unexpected failures121
# of expected failures  2604
# of unsupported tests  11669
/daten/aranym/gcc/gcc-20240615/Build/gcc/xg++  version 15.0.0 20240614 
(experimental) [master r15-1347-ge5e341243bf4a8] (GCC) 

Host   is x86_64-suse-linux-gnu

=== gcc tests ===


Running target aranym
FAIL: gcc.c-torture/execute/pr97073.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O0  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O1  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O2  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O3 -g  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -Os  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/debug/btf/btf-bitfields-1.c scan-assembler-times [\\t 
]0x1340[\\t ]+[^\\n]*btm_offset 1
FAIL: gcc.dg/Warray-bounds-48-novec.c (test for excess errors)
FAIL: gcc.dg/builtin-object-size-20.c scan-tree-dump-not optimized "fail"
FAIL: gcc.dg/ifcvt-4.c scan-rtl-dump ce1 "2 true changes made"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/memcmp-3.c (test for excess errors)
UNRESOLVED: gcc.dg/memcmp-3.c scan-tree-dump-not optimized "abort"
FAIL: gcc.dg/pr110279-1.c scan-tree-dump-times widening_mul "Generated FMA" 3
FAIL: gcc.dg/pr46647.c scan-tree-dump-not optimized "memset"
FAIL: gcc.dg/pr84877.c execution test
FAIL: gcc.dg/pr87954.c scan-tree-dump-times optimized " *w? 
|WIDEN_MULT_PLUS_EXPR" 1
UNRESOLVED: gcc.dg/superblock.c scan-rtl-dump-times sched2 "ADVANCING TO" 2
FAIL: c-c++-common/auto-init-7.c  -Wc++-compat   scan-tree-dump gimple "temp4 = 
.DEFERRED_INIT ((8|5), 2, &"temp4""
FAIL: c-c++-common/auto-init-8.c  -Wc++-compat   scan-tree-dump gimple "temp4 = 
.DEFERRED_INIT ((8|5), 1, &"temp4""
FAIL: c-c++-common/pr51628-3.c  -Wc++-compat   at line 16 (test for warnings, 
line 15)
FAIL: c-c++-common/pr51628-3.c  -Wc++-compat   at line 24 (test for warnings, 
line 23)
FAIL: c-c++-common/pr51628-3.c  -Wc++-compat   at line 27 (test for warnings, 
line 26)
FAIL: c-c++-common/pr51628-3.c  -Wc++-compat   at line 30 (test for warnings, 
line 29)
FAIL: c-c++-common/pr51628-3.c  -Wc++-compat   at line 32 (t

[Bug c++/115486] ICE: Segfault while compiling partial template specialization with expanded parameter pack of function pointers

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115486

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Keywords||ice-on-valid-code
  Known to work|7.5.0   |
   Last reconfirmed||2024-06-15
 Status|UNCONFIRMED |NEW

--- Comment #2 from Andrew Pinski  ---
Confirmed.

[Bug c++/115503] Explicit deduction guide - Capture parameter pack in lambda - Compiler segfaults

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115503

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
  Known to fail||10.1.0, 11.1.0, 9.1.0
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2024-06-15

--- Comment #1 from Andrew Pinski  ---
Confirmed. Seems to be ICEing since lambda in unevaluated context support was
added.

Results for 15.0.0 20240615 (experimental) [master revision gcc-15-1352-g079506b8aaf] (GCC) testsuite on armv8l-unknown-linux-gnueabihf

2024-06-15 Thread ci_notify--- via Gcc-testresults
# From 
https://ci.linaro.org/job/tcwg_gnu_native_check_gcc--master-arm-build/1265/:
LAST_UPDATED: 2024-06-15T18:33:47+00:00 (master revision 
gcc-15-1352-g079506b8aaf) armv8l-unknown-linux-gnueabihf

Native configuration is armv8l-unknown-linux-gnueabihf

=== libatomic tests ===


Running target tcwg-local

=== libatomic Summary ===

# of expected passes44
# of unsupported tests  5
=== libffi tests ===


Running target tcwg-local

=== libffi Summary ===

# of expected passes1574
=== libgo tests ===


Running target unix
FAIL: go/types
FAIL: runtime
FAIL: runtime/debug
FAIL: runtime/pprof
FAIL: sync/atomic

=== libgo Summary ===

# of expected passes191
# of unexpected failures5
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/armv8l-unknown-linux-gnueabihf/armv8l-unknown-linux-gnueabihf/gcc-gcc.git~master-stage2/./gcc/gccgo
 version 15.0.0 20240615 (experimental) [master revision 
gcc-15-1352-g079506b8aaf] (GCC)

=== libgomp tests ===


Running target tcwg-local
XPASS: libgomp.c/alloc-pinned-1.c execution test
XPASS: libgomp.c/alloc-pinned-2.c execution test
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
190 (test for warnings, line 185)
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
221 (test for warnings, line 214)
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
252 (test for warnings, line 245)
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2  (test for 
excess errors)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
190 (test for warnings, line 185)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
221 (test for warnings, line 214)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
252 (test for warnings, line 245)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2  (test for 
excess errors)

=== libgomp Summary ===

# of expected passes16418
# of unexpected failures8
# of unexpected successes   2
# of expected failures  284
# of unsupported tests  715
=== libitm tests ===


Running target tcwg-local

=== libitm Summary ===

# of expected passes44
# of expected failures  3
# of unsupported tests  1
=== libphobos tests ===


Running target tcwg-local
FAIL: libphobos.druntime/object.d (test for excess errors)
FAIL: libphobos.druntime_shared/object.d (test for excess errors)
FAIL: libphobos.exceptions/rt_trap_exceptions.d output pattern test
FAIL: libphobos.phobos/std/complex.d execution test
FAIL: libphobos.phobos/std/concurrency.d (test for excess errors)
FAIL: libphobos.phobos/std/experimental/allocator/building_blocks/free_list.d 
(test for excess errors)
FAIL: libphobos.phobos/std/experimental/allocator/building_blocks/free_tree.d 
(test for excess errors)
FAIL: 
libphobos.phobos/std/experimental/allocator/building_blocks/kernighan_ritchie.d 
execution test
FAIL: libphobos.phobos/std/experimental/allocator/mmap_allocator.d execution 
test
FAIL: libphobos.phobos/std/experimental/allocator/package.d (test for excess 
errors)
FAIL: libphobos.phobos/std/format/internal/floats.d (test for excess errors)
UNRESOLVED: libphobos.phobos/std/format/internal/floats.d compilation failed to 
produce executable
FAIL: libphobos.phobos/std/format/internal/write.d (test for excess errors)
UNRESOLVED: libphobos.phobos/std/format/internal/write.d compilation failed to 
produce executable
FAIL: libphobos.phobos/std/math/hardware.d execution test
FAIL: libphobos.phobos/std/math/operations.d (test for excess errors)
UNRESOLVED: libphobos.phobos/std/math/operations.d compilation failed to 
produce executable
FAIL: libphobos.phobos/std/parallelism.d execution test
FAIL: libphobos.phobos/std/random.d (test for excess errors)
FAIL: libphobos.phobos/std/range/package.d (test for excess errors)
FAIL: libphobos.phobos/std/typecons.d (test for excess errors)
FAIL: libphobos.phobos_shared/std/complex.d execution test
FAIL: libphobos.phobos_shared/std/concurrency.d (test for excess errors)
FAIL: 
libphobos.phobos_shared/std/experimental/allocator

[Bug c++/115504] [14/15 Regression] Wrong decltype result for a captured reference inside lambda

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115504

--- Comment #1 from Andrew Pinski  ---
I suspect the fix for PR 96917 broke references (or rather changed all to be
non references).

Results for 12.3.1 20240615 [remotes/origin/releases/gcc-12 r12-10559-g573a5f3315] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-06-15 Thread Bill Seurer (POWER9) via Gcc-testresults
   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.j == 14
FAIL: gcc.dg/guality/vla-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 25 sizeof (a) == 6 * sizeof 
(int)
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O0  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O1  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O2  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O3 -g  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -Os  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O0  execution test
FAIL: gcc.dg/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr91323.c   -O0  execution test
FAIL: gcc.dg/torture/pr91323.c   -O1  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2  execution test
FAIL: gcc.dg/torture/pr91323.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr91323.c   -Os  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.target/powerpc/pr56605.c scan-rtl-dump-times combine "(compare:CC 
((?:and|zero_extend):(?:[SD]I) ((?:sub)?reg:[SD]I" 1
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
FAIL: gcc.target/powerpc/rs6000-fpint.c scan-assembler-not stfiwx
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes163408
# of unexpected failures213
# of unexpected successes   18
# of expected failures  1481
# of unsupported tests  3130
/home/gccbuild/build/nightly/build-gcc-12/gcc/xgcc  version 12.3.1 20240615 
[remotes/origin/releases/gcc-12 r12-10559-g573a5f3315] (GCC) 

=== gfortran tests ===


Running target unix
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O0  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O1  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O2  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -Os  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O0  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O1  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O2  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -Os  execution test

=== gfortran Summary ===

# of expected passes66428
# of unexpected failures6
# of unexpected successes   6
# of expected failures  284
# of unsupported tests  188
/home/gccbuild/build/nightly/build-gcc-12/gcc/gfortran  version 12.3.1 20240615 
[remotes/origin/releases/gcc-12 r12-10559-g573a5f3315] (GCC) 

=== g++ tests ===


Running target unix

=== g++ Summary ===

# of expected passes228610
# of expected failures  1930
# of unsupported tests  10559
/home/gccbuild/build/nightly/build-gcc-12/gcc/xg++  version 12.3.1 20240615 
[remotes/origin/releases/gcc-12 r12-10559-g573a5f3315] (GCC) 

=== obj-c++ tests ===


Running target unix

=== obj-c++ Summary ===

# of expected passes1502
# of expected failures  10
# of unsupported tests  79
/home/gccbuild/build/nightly/build-gcc-12/gcc/xg++  version 12.3.1 20240615 
[remotes/origin/releases/gcc-12 r12-105

[Bug libstdc++/115497] [15 Regression] __is_pointer doesn't compile with clang since 014879ea4c86b3b8ab6b61a1226ee5b31e816c8b

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115497

--- Comment #12 from Andrew Pinski  ---
(In reply to Jonathan Wakely from comment #11)
> Although that class template has been there for years, so if any library
> like abseil was using the built-in, they're already have the problem that
> libstdc++ now has.

It looks like the abseil code is not using __is_pointer directly at all, but
rather the standard headers here. I suspect we should just rename the
__is_pointer template to workaround this clang oddness (and add a comment on
why the name is not __is_pointer).

Re: [PATCH v1] RISC-V: Add testcases for vector unsigned SAT_SUB form 2

2024-06-15 Thread Jeff Law




On 6/15/24 6:56 AM, pan2...@intel.com wrote:

From: Pan Li 

The previous RISC-V backend .SAT_SUB enabling patch missed the form 2
testcases of vector modes.  Aka:

Form 2:
   #define DEF_VEC_SAT_U_SUB_FMT_2(T)   \
   void __attribute__((noinline))   \
   vec_sat_u_sub_##T##_fmt_2 (T *out, T *op_1, T *op_2, unsigned limit) \
   {\
 unsigned i;\
 for (i = 0; i < limit; i++)\
   {\
 T x = op_1[i]; \
 T y = op_2[i]; \
 out[i] = (x - y) & (-(T)(x > y));  \
   }\
   }

This patch would like to make it up to ensure form 2 of .SAT_SUB vector
is covered.

Passed the rv64gcv rvv.exp tests.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-5.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-6.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-7.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-8.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-5.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-6.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-7.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-8.c: New test.

OK
jeff



[PATCH v2] LoongArch: Tweak IOR rtx_cost for bstrins

2024-06-15 Thread Xi Ruoyao
Consider

c &= 0xfff;
a &= ~0xfff;
b &= ~0xfff;
a |= c;
b |= c;

This can be done with 2 bstrins instructions.  But we need to recognize
it in loongarch_rtx_costs or the compiler will not propagate "c & 0xfff"
forward.

gcc/ChangeLog:

* config/loongarch/loongarch.cc:
(loongarch_use_bstrins_for_ior_with_mask): Split the main logic
into ...
(loongarch_use_bstrins_for_ior_with_mask_1): ... here.
(loongarch_rtx_costs): Special case for IOR those can be
implemented with bstrins.

gcc/testsuite/ChangeLog;

* gcc.target/loongarch/bstrins-3.c: New test.
---

Bootstrapped and regtested on loongarch64-linux-gnu.  Ok for trunk?

 gcc/config/loongarch/loongarch.cc | 73 ++-
 .../gcc.target/loongarch/bstrins-3.c  | 16 
 2 files changed, 72 insertions(+), 17 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/loongarch/bstrins-3.c

diff --git a/gcc/config/loongarch/loongarch.cc 
b/gcc/config/loongarch/loongarch.cc
index 6ec3ee62502..256b76d044b 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -3681,6 +3681,27 @@ loongarch_set_reg_reg_piece_cost (machine_mode mode, 
unsigned int units)
   return COSTS_N_INSNS ((GET_MODE_SIZE (mode) + units - 1) / units);
 }
 
+static int
+loongarch_use_bstrins_for_ior_with_mask_1 (machine_mode mode,
+  unsigned HOST_WIDE_INT mask1,
+  unsigned HOST_WIDE_INT mask2)
+{
+  if (mask1 != ~mask2 || !mask1 || !mask2)
+return 0;
+
+  /* Try to avoid a right-shift.  */
+  if (low_bitmask_len (mode, mask1) != -1)
+return -1;
+
+  if (low_bitmask_len (mode, mask2 >> (ffs_hwi (mask2) - 1)) != -1)
+return 1;
+
+  if (low_bitmask_len (mode, mask1 >> (ffs_hwi (mask1) - 1)) != -1)
+return -1;
+
+  return 0;
+}
+
 /* Return the cost of moving between two registers of mode MODE.  */
 
 static int
@@ -3812,6 +3833,38 @@ loongarch_rtx_costs (rtx x, machine_mode mode, int 
outer_code,
   /* Fall through.  */
 
 case IOR:
+  {
+   rtx op[2] = {XEXP (x, 0), XEXP (x, 1)};
+   if (GET_CODE (op[0]) == AND && GET_CODE (op[1]) == AND
+   && (mode == SImode || (TARGET_64BIT && mode == DImode)))
+ {
+   rtx rtx_mask0 = XEXP (op[0], 1), rtx_mask1 = XEXP (op[1], 1);
+   if (CONST_INT_P (rtx_mask0) && CONST_INT_P (rtx_mask1))
+ {
+   unsigned HOST_WIDE_INT mask0 = UINTVAL (rtx_mask0);
+   unsigned HOST_WIDE_INT mask1 = UINTVAL (rtx_mask1);
+   if (loongarch_use_bstrins_for_ior_with_mask_1 (mode,
+  mask0,
+  mask1))
+ {
+   /* A bstrins instruction */
+   *total = COSTS_N_INSNS (1);
+
+   /* A srai instruction */
+   if (low_bitmask_len (mode, mask0) == -1
+   && low_bitmask_len (mode, mask1) == -1)
+ *total += COSTS_N_INSNS (1);
+
+   for (int i = 0; i < 2; i++)
+ *total += set_src_cost (XEXP (op[i], 0), mode, speed);
+
+   return true;
+ }
+ }
+ }
+  }
+
+  /* Fall through.  */
 case XOR:
   /* Double-word operations use two single-word operations.  */
   *total = loongarch_binary_cost (x, COSTS_N_INSNS (1), COSTS_N_INSNS (2),
@@ -5796,23 +5849,9 @@ bool loongarch_pre_reload_split (void)
 int
 loongarch_use_bstrins_for_ior_with_mask (machine_mode mode, rtx *op)
 {
-  unsigned HOST_WIDE_INT mask1 = UINTVAL (op[2]);
-  unsigned HOST_WIDE_INT mask2 = UINTVAL (op[4]);
-
-  if (mask1 != ~mask2 || !mask1 || !mask2)
-return 0;
-
-  /* Try to avoid a right-shift.  */
-  if (low_bitmask_len (mode, mask1) != -1)
-return -1;
-
-  if (low_bitmask_len (mode, mask2 >> (ffs_hwi (mask2) - 1)) != -1)
-return 1;
-
-  if (low_bitmask_len (mode, mask1 >> (ffs_hwi (mask1) - 1)) != -1)
-return -1;
-
-  return 0;
+  return loongarch_use_bstrins_for_ior_with_mask_1 (mode,
+   UINTVAL (op[2]),
+   UINTVAL (op[4]));
 }
 
 /* Rewrite a MEM for simple load/store under -mexplicit-relocs=auto
diff --git a/gcc/testsuite/gcc.target/loongarch/bstrins-3.c 
b/gcc/testsuite/gcc.target/loongarch/bstrins-3.c
new file mode 100644
index 000..13762bdef42
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/bstrins-3.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-rtl-final" } */
+/* { dg-final { scan-rtl-dump-times "insv\[sd\]i" 2 "final" } } */
+
+struct X {
+  long a, b;
+};
+
+struct X
+test (long a, long b, long c)
+{
+  c &= 0xfff;
+  a &= ~0xfff;
+  b &= ~0xfff;
+  return (struct X){.a = a | c, .b = b | c}; 
+}
-- 

Results for 15.0.0 20240615 (experimental) [remotes/origin/HEAD r15-1348-g471fb09260] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-06-15 Thread Bill Seurer (POWER8) via Gcc-testresults
-partition=none  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/pr68860-1.c   -Os  -DPREVENT_OPTIMIZATION  line 16 y == 2
FAIL: gcc.dg/guality/pr68860-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/sra-1.c   -O2  -DPREVENT_OPTIMIZATION  line 43 a.j == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 43 a.j == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 21 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.j == 14
FAIL: gcc.dg/guality/sra-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 43 a.j == 14
FAIL: gcc.dg/guality/sra-1.c   -Os  -DPREVENT_OPTIMIZATION  line 43 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.j == 14
FAIL: gcc.dg/guality/vla-1.c   -O2  -DPREVENT_OPTIMIZATION  line 17 sizeof (a) 
== 6
FAIL: gcc.dg/guality/vla-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 17 sizeof 
(a) == 6
FAIL: gcc.dg/guality/vla-1.c   -Os  -DPREVENT_OPTIMIZATION  line 17 sizeof (a) 
== 6
FAIL: gcc.dg/torture/pr52451.c   -O0  execution test
FAIL: gcc.dg/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.dg/tree-ssa/update-threading.c scan-tree-dump-times optimized 
"Invalid sum" 0
FAIL: gcc.dg/vect/costmodel/ppc/costmodel-slp-12.c scan-tree-dump-times vect 
"vectorizing stmts using SLP" 3
FAIL: gcc.dg/vect/vect-117.c -flto -ffat-lto-objects  scan-tree-dump-not 
optimized "Invalid sum"
FAIL: gcc.dg/vect/vect-117.c scan-tree-dump-not optimized "Invalid sum"
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes179351
# of unexpected failures126
# of unexpected successes   13
# of expected failures  1600
# of unsupported tests  5065
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 15.0.0 20240615 
(experimental) [remotes/origin/HEAD r15-1348-g471fb09260] (GCC) 

=== gfortran tests ===


Running target unix
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O0  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O1  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O2  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -Os  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O0  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O1  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O2  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loop

-Wcast-qual consistency with initialization conversion and double pointer types

2024-06-15 Thread Ryan Libby via Gcc
I'm not a C language expert and I'm looking for advice on whether a
-Wcast-qual diagnostic in one situation and not another is intentional
behavior.

Here's a set of examples (same as attachment).

% cat cast-qual-example.c
#define F(name, type, qual) \
typedef type t_##name;  \
void name(void) {   \
t_##name x = 0, y, z;   \
y = *(t_##name qual *)   \
z = *(t_##name qual *){}; \
}

F(fcc, char, const)
F(fpc, char *, const)
F(fcv, char, volatile)
F(fpv, char *, volatile)

void fpv2(void) {
char *x = 0, *y, *z;
y = *(char * volatile *)
z = *(char * volatile *){};
}

void eg1(void) {
/* Adapted from -Wcast-qual doc */
char v0 = 'v';
char *v1 = 
char **p = 
/* p is char ** value.  */
char * volatile *q = (char * volatile *) p;
/* Assignment of volatile pointer to char is OK. */
char u0 = 'u';
char * volatile u1 = 
*q = u1;
/* Now *q is accessed through a non-volatile-qualified pointer. */
*p = 0;
}

void eg2(void) {
char v = 'v';
char *p = 
/* p is char * value.  */
char volatile *q = (char volatile *) p;
/* Assignment of volatile char is OK (and also plain char). */
char volatile u = 'u';
*q = u;
/* Now *q is accessed through a non-volatile-qualified pointer. */
*p = 0;
}

% gcc13 -std=c17 -Wall -Wextra -Wcast-qual -Wno-unused -c
cast-qual-example.c -o /dev/null
cast-qual-example.c: In function 'fpv':
cast-qual-example.c:5:14: warning: to be safe all intermediate
pointers in cast from 'char **' to 'char * volatile*' must be 'const'
qualified [-Wcast-qual]
5 | y = *(t_##name qual *)   \
  |  ^
cast-qual-example.c:12:1: note: in expansion of macro 'F'
   12 | F(fpv, char *, volatile)
  | ^
cast-qual-example.c: In function 'fpv2':
cast-qual-example.c:16:14: warning: to be safe all intermediate
pointers in cast from 'char **' to 'char * volatile*' must be 'const'
qualified [-Wcast-qual]
   16 | y = *(char * volatile *)
  |  ^
cast-qual-example.c: In function 'eg1':
cast-qual-example.c:26:30: warning: to be safe all intermediate
pointers in cast from 'char **' to 'char * volatile*' must be 'const'
qualified [-Wcast-qual]
   26 | char * volatile *q = (char * volatile *) p;
  |  ^
% clang -std=c17 -Wall -Wextra -Wcast-qual -Wno-unused -c
cast-qual-example.c -o /dev/null
%

The macro and typedef are to illustrate the point, they aren't otherwise
needed, and fpv2 shows the same thing without them.

So, in the conversion of char ** to char * volatile *, the cast before
the assignment of y is diagnosed, but the conversion in the
initialization of the compound literal for the assignment of z is not.

First, is the cast construct actually different from the initialization
construct in terms of safety?  I would think not, but maybe I am
missing something.

I think that both assignment expressions in fpv as a whole are
ultimately safe, considering also the immediate dereference of the
temporary outer pointer value.

In eg1 and eg2 I modified examples from the -Wcast-qual documentation.
eg1 is diagnosed, eg2 is not.

I think that the *p assignment in eg1 might be undefined behavior
(6.7.3, referring to an object with volatile-qualified type (*q) through
an lvalue without volatile-qualified type (*p)).

But then I don't get why the same wouldn't be true if we take away the
inner pointer and repeat the exercise with plain char (eg1 vs eg2).

So, what's going on here?  Is the gcc behavior intentional?  Is it
consistent?  And is there a recommended way to construct a temporary
volatile pointer to an object (which may itself be a pointer) without
tripping -Wcast-qual, without just casting away type information (as in,
without intermediate casts through void *, uintptr_t, etc), and
preferably also without undefined behavior?

I have checked that the behavior is the same with current sources and
-std=c23 (gcc (GCC) 15.0.0 20240614 (experimental)).

P.s. I have seen gcc bug 84166 that advises that the -Wcast-qual warning
from the cast is intentional in that case.  I think this case is
different because in that case the qualifiers are on the innermost type.

Thank you,

Ryan Libby
#define	F(name, type, qual)		\
typedef type t_##name;			\
void name(void) {			\
	t_##name x = 0, y, z;		\
	y = *(t_##name qual *)	\
	z = *(t_##name qual *){};	\
}

F(fcc, char, const)
F(fpc, char *, const)
F(fcv, char, volatile)
F(fpv, char *, volatile)

void fpv2(void) {
	char *x = 0, *y, *z;
	y = *(char * volatile *)
	z = *(char * volatile *){};
}

void eg1(void) {
	/* Adapted from -Wcast-qual doc */
	char v0 = 'v';
	char *v1 = 
	char **p = 
	/* p is char ** value.  */
	char * volatile *q = (char * volatile *) p;
	/* Assignment of volatile pointer to char is OK. */
	char u0 = 'u';

[Bug libstdc++/115497] [15 Regression] __is_pointer doesn't compile with clang since 014879ea4c86b3b8ab6b61a1226ee5b31e816c8b

2024-06-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115497

--- Comment #11 from Jonathan Wakely  ---
Although that class template has been there for years, so if any library like
abseil was using the built-in, they're already have the problem that libstdc++
now has.

[Bug libstdc++/115497] [15 Regression] __is_pointer doesn't compile with clang since 014879ea4c86b3b8ab6b61a1226ee5b31e816c8b

2024-06-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115497

--- Comment #10 from Jonathan Wakely  ---
The only foolproof fix would be to rename the __is_pointer class template.

[Bug libstdc++/115497] [15 Regression] __is_pointer doesn't compile with clang since 014879ea4c86b3b8ab6b61a1226ee5b31e816c8b

2024-06-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115497

--- Comment #9 from Jonathan Wakely  ---
Changing libstdc++ order of includes won't help abseil. If their use of
__is_pointer still comes after any standard header has included
cpp_type_traits.h, the identifier will be "poisoned" by the class template. So
they need their own workaround.

Results for 15.0.0 20240615 (experimental) [master revision gcc-15-1352-g079506b8aaf] (GCC) testsuite on armv8l-unknown-linux-gnueabihf

2024-06-15 Thread ci_notify--- via Gcc-testresults
an-tree-dump vect "Detected reduction"
FAIL: gcc.dg/vect/vect-fmin-2.c scan-tree-dump vect "LOOP VECTORIZED"
FAIL: gcc.dg/vect/vect-fmin-3.c -flto -ffat-lto-objects  scan-tree-dump vect 
"Detected reduction"
FAIL: gcc.dg/vect/vect-fmin-3.c -flto -ffat-lto-objects  scan-tree-dump vect 
"LOOP VECTORIZED"
FAIL: gcc.dg/vect/vect-fmin-3.c scan-tree-dump vect "Detected reduction"
FAIL: gcc.dg/vect/vect-fmin-3.c scan-tree-dump vect "LOOP VECTORIZED"
FAIL: gcc.target/arm/addr-modes-float.c scan-assembler vst3.8\\t{d[02468], 
d[02468], d[02468]}, [r[0-9]+]!
FAIL: gcc.target/arm/aes_xor_combine.c scan-assembler-not veor
FAIL: gcc.target/arm/fmaxmin.c scan-assembler-times vmaxnm.f32\\ts[0-9]+, 
s[0-9]+, s[0-9]+ 1
FAIL: gcc.target/arm/fmaxmin.c scan-assembler-times vminnm.f32\\ts[0-9]+, 
s[0-9]+, s[0-9]+ 1
FAIL: gcc.target/arm/ftest-armv5t-thumb.c (test for excess errors)
FAIL: gcc.target/arm/ftest-armv5te-thumb.c (test for excess errors)
FAIL: gcc.target/arm/ftest-armv6-thumb.c (test for excess errors)
FAIL: gcc.target/arm/ftest-armv6k-thumb.c (test for excess errors)
FAIL: gcc.target/arm/ftest-armv6z-thumb.c (test for excess errors)
FAIL: gcc.target/arm/memset-inline-8.c scan-assembler-not vstr
FAIL: gcc.target/arm/pr40457-2.c scan-assembler strd|stm
FAIL: gcc.target/arm/pr43920-2.c object-size text <= 54
FAIL: gcc.target/arm/pr43920-2.c scan-assembler-times pop 2
FAIL: gcc.target/arm/pr59858.c (test for excess errors)
FAIL: gcc.target/arm/pr65647.c (test for excess errors)
FAIL: gcc.target/arm/pr65710.c (test for excess errors)
FAIL: gcc.target/arm/vect-early-break-cbranch.c check-function-bodies f1
FAIL: gcc.target/arm/vect-early-break-cbranch.c check-function-bodies f2
FAIL: gcc.target/arm/vect-early-break-cbranch.c check-function-bodies f3
FAIL: gcc.target/arm/vect-early-break-cbranch.c check-function-bodies f4
FAIL: gcc.target/arm/vect-early-break-cbranch.c check-function-bodies f5
FAIL: gcc.target/arm/vect-early-break-cbranch.c check-function-bodies f6
FAIL: gcc.target/arm/wmul-5.c scan-assembler umlal
FAIL: gcc.target/arm/wmul-6.c scan-assembler smlalbb
FAIL: gcc.target/arm/wmul-7.c scan-assembler umlal
FAIL: gcc.target/arm/simd/mve-vabs.c scan-assembler-times memmove 3
FAIL: gcc.target/arm/simd/mve-vshr.c scan-assembler-times 
vneg.s[0-9]+tq[0-9]+, q[0-9]+ 6
FAIL: gcc.target/arm/simd/mve-vshr.c scan-assembler-times 
vshl.s[0-9]+tq[0-9]+, q[0-9]+ 3
FAIL: gcc.target/arm/simd/mve-vshr.c scan-assembler-times 
vshl.u[0-9]+tq[0-9]+, q[0-9]+ 3

=== gcc Summary ===

# of expected passes194012
# of unexpected failures209
# of unexpected successes   45
# of expected failures  1549
# of unsupported tests  6954
/home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/bin/armv8l-unknown-linux-gnueabihf-gcc
  version 15.0.0 20240615 (experimental) [master revision 
gcc-15-1352-g079506b8aaf] (GCC) 

=== gfortran tests ===


Running target tcwg-local
FAIL: gfortran.dg/ieee/comparisons_3.F90   -Os  execution test

=== gfortran Summary ===

# of expected passes68873
# of unexpected failures1
# of expected failures  265
# of unsupported tests  528
/home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/bin/armv8l-unknown-linux-gnueabihf-gfortran
  version 15.0.0 20240615 (experimental) [master revision 
gcc-15-1352-g079506b8aaf] (GCC) 

=== g++ tests ===


Running target tcwg-local
FAIL: g++.dg/guality/pr55665.C   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  line 23 p == 40
XPASS: g++.target/arm/bfloat_cpp_typecheck.C  (test for bogus messages, line 10)
XPASS: g++.target/arm/bfloat_cpp_typecheck.C  (test for bogus messages, line 11)

=== g++ Summary ===

# of expected passes268303
# of unexpected failures1
# of unexpected successes   2
# of expected failures  2791
# of unsupported tests  11867
/home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/bin/armv8l-unknown-linux-gnueabihf-g++
  version 15.0.0 20240615 (experimental) [master revision 
gcc-15-1352-g079506b8aaf] (GCC) 

=== objc tests ===


Running target tcwg-local

=== objc Summary ===

# of expected passes2846
# of unsupported tests  70
/home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/bin/armv8l-unknown-linux-gnueabihf-gcc
  version 15.0.0 20240615 (experimental) [master revision 
gcc-15-1352-g079506b8aaf] (GCC) 


Compiler version: 15.0.0 20240615 (experimental) [master revision 
gcc-15-1352-g079506b8aaf] (GCC) 
Platform: armv8l-unknown-linux-gnueabihf
configure flags: SHELL=/bin/bash 
--with-mpc=/home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/builds/destdir/armv8l-unknown-linux-gnuea

[Bug pch/115312] [14/15 Regression] ICE when including a PCH via compiler option -include

2024-06-15 Thread lhyatt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115312

--- Comment #5 from Lewis Hyatt  ---
(In reply to Brecht Sanders from comment #4)
> No, that patch wasn't added for my build, see my build recipe here:
> https://github.com/brechtsanders/winlibs_recipes/blob/main/recipes/gcc.winlib

Thanks, this script is useful. FWIW I think the patch is there, line 778?
Unless I am missing something.

I see you also commented out the assert in your recipe. I am still not sure if
that is just masking some deeper issue, but I am getting close to being able to
reproduce it myself and will let you know.

Re: [C PATCH, v3] Fix for redeclared enumerator initialized with different type [PR115109]

2024-06-15 Thread Martin Uecker


The patch fails on arm because the tests make assumptions
about enums that are not true everywhere. Should we just 
limit the tests to x86?

Martin

Am Montag, dem 03.06.2024 um 17:37 + schrieb Joseph Myers:
> On Sat, 1 Jun 2024, Martin Uecker wrote:
> 
> > This is a new version of the patch.  I changed the overflow warning to
> > an error and added your other example to the test case.
> > 
> > Bootstrapped and regression tested on x86_64.
> > 
> > 
> > c23: Fix for redeclared enumerator initialized with different type 
> > [PR115109]
> > 
> > c23 specifies that the type of a redeclared enumerator is the one of the
> > previous declaration.  Convert initializers with different type 
> > accordingly
> > and emit an error when the value does not fit.
> > 
> > 2024-06-01 Martin Uecker  
> > 
> > PR c/115109
> > 
> > gcc/c/
> > * c-decl.cc (build_enumerator): When redeclaring an
> > enumerator convert value to previous type.  For redeclared
> > enumerators use underlying type for computing the next value.
> > 
> > gcc/testsuite/
> > * gcc.dg/pr115109.c: New test.
> > * gcc.dg/c23-tag-enum-6.c: New test.
> > * gcc.dg/c23-tag-enum-7.c: New test.
> 
> OK.
> 



[Bug rtl-optimization/115505] missing optimization: thumb1 use ldmia/stmia for load store DI/DF data when possible

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115505

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization

--- Comment #1 from Andrew Pinski  ---
Note patches should be posted to gcc-patches@ after reading
https://gcc.gnu.org/contribute.html .

[Bug middle-end/115506] Possible but missed "cmp" instruction merging (x86 & ARM, optimization)

2024-06-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115506

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
  Component|rtl-optimization|middle-end

[Bug other/115506] New: Possible but missed "cmp" instruction merging (x86 & ARM, optimization)

2024-06-15 Thread Explorer09 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115506

Bug ID: 115506
   Summary: Possible but missed "cmp" instruction merging (x86 &
ARM, optimization)
   Product: gcc
   Version: 14.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: Explorer09 at gmail dot com
  Target Milestone: ---

I'm not sure if the GCC developers are interested in this optimization or if
this issue has been reported before.



(Compiler Explorer link: https://godbolt.org/z/vqqf865cb)

```c
#include 

// Modified from 
uint32_t utf8_to_code_point(const uint8_t **sequence) {
if (**sequence <= 0x7F) {
return *(*sequence)++;
}

unsigned int max_length;
uint32_t min_code_point;
if ((**sequence & 0xF0) == 0xE0) { /* NOTE 0 */
max_length = 3;
min_code_point = 0x0800;
} else if ((**sequence & 0xF0) < 0xE0) { /* NOTE 1 */
max_length = 2;
min_code_point = 0x80;
} else {
max_length = 4;
min_code_point = 0x1;
}

uint32_t code_point = (uint32_t)**sequence - (0xFF & ~(0xFF >>
max_length));
while (1) {
(*sequence)++;
if (--max_length == 0) {
break;
}
unsigned int code_offset = (unsigned int)**sequence - 0x80;
if (code_offset > 0x3F) {
return (uint32_t)-1;
}
code_point = (code_point << 6) + code_offset;
}

if (code_point < min_code_point) {
return (uint32_t)-1;
}
if (code_point >= 0xD800 && code_point <= 0xDFFF) {
return (uint32_t)-1;
}
return code_point;
}
```

I wrote this code with the expectation that the compiler can optimize the "cmp"
 instructions so that the same compare status can be used twice.

But instead I get this:

```x86asm
#   ...
movl%eax, %ecx
andl$-16, %ecx
cmpb$-32, %cl
je  .L8
cmpb$-33, %cl
ja  .L9
#   ...
```

The immediate constant for the second "cmp" instruction gets modified
off-by-one (I can guess the reason for that) and missed this particular chance
of merging the comparisons.

A workaround is to modify the line marked with the `/* NOTE 1 */` comment to
use `<=` instead of `<`. But I wish GCC can detect this optimization
opportunity better.

[Bug c++/115231] [C++20] [Modules] deduction guides reachability

2024-06-15 Thread nshead at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115231

Nathaniel Shead  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1
 CC||nshead at gcc dot gnu.org
   Last reconfirmed|2024-05-26 00:00:00 |2024-06-15
   Assignee|unassigned at gcc dot gnu.org  |nshead at gcc dot 
gnu.org

[Bug rtl-optimization/115505] New: missing optimization: thumb1 use ldmia/stmia for load store DI/DF data when possible

2024-06-15 Thread lis8215 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115505

Bug ID: 115505
   Summary: missing optimization: thumb1 use ldmia/stmia for load
store DI/DF data when possible
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: lis8215 at gmail dot com
  Target Milestone: ---

Created attachment 58438
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58438=edit
possible solution patch

At the moment GCC emits two ldr/str instructions for DI/DF modes load/store.
However there's a trick to use ldmia/stmia when address register in not
used anymore/dead or reused.

I don't know if it affects arm and/or thumb2 as well.
Patch for possible solution for thumb1 provided.

Comparing code size with the patch gives for v6-m/nofp:
   libgcc:  -52 bytes / -0.10%
Newlib's libc:  -68 bytes / -0.03%
 libm:  -96 bytes / -0.10%
libstdc++: -140 bytes / -0.02%

Re: [PATCH] LoongArch: Tweak IOR rtx_cost for bstrins

2024-06-15 Thread Xi Ruoyao
On Sat, 2024-06-15 at 21:44 +0800, Xi Ruoyao wrote:
> +     for (int i = 0; i < 2; i++)
> +   *total += set_src_cost (XEXP (op0, i), mode,
> speed);

Oops this is wrong.  I need to fix this and regtest again.

-- 
Xi Ruoyao 
School of Aerospace Science and Technology, Xidian University


[PATCH] LoongArch: Only transform move/move/bstrins to srai/bstrins when -Os

2024-06-15 Thread Xi Ruoyao
The first form has a lower latency (due to the special handling of
"move" in LA464 and LA664) despite it's longer.

gcc/ChangeLog:

* config/loongarch/loongarch.md (define_peephole2): Require
optimize_insn_for_size_p () for move/move/bstrins =>
srai/bstrins transform.
---

Bootstrapped and regtested on loongarch64-linux-gnu.  Ok for trunk?

 gcc/config/loongarch/loongarch.md | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gcc/config/loongarch/loongarch.md 
b/gcc/config/loongarch/loongarch.md
index 25c1d323ba0..e4434c3bd4e 100644
--- a/gcc/config/loongarch/loongarch.md
+++ b/gcc/config/loongarch/loongarch.md
@@ -1617,20 +1617,23 @@ (define_insn_and_split "*bstrins__for_ior_mask"
   })
 
 ;; We always avoid the shift operation in bstrins__for_ior_mask
-;; if possible, but the result may be sub-optimal when one of the masks
+;; if possible, but the result may be larger when one of the masks
 ;; is (1 << N) - 1 and one of the src register is the dest register.
 ;; For example:
 ;; movet0, a0
 ;; movea0, a1
 ;; bstrins.d   a0, t0, 42, 0
 ;; ret
-;; using a shift operation would be better:
+;; using a shift operation would be smaller:
 ;; srai.d  t0, a1, 43
 ;; bstrins.d   a0, t0, 63, 43
 ;; ret
 ;; unfortunately we cannot figure it out in split1: before reload we cannot
 ;; know if the dest register is one of the src register.  Fix it up in
 ;; peephole2.
+;;
+;; Note that the first form has a lower latency so this should only be
+;; done when optimizing for size.
 (define_peephole2
   [(set (match_operand:GPR 0 "register_operand")
(match_operand:GPR 1 "register_operand"))
@@ -1639,7 +1642,7 @@ (define_peephole2
  (match_operand:SI 3 "const_int_operand")
  (const_int 0))
(match_dup 0))]
-  "peep2_reg_dead_p (3, operands[0])"
+  "peep2_reg_dead_p (3, operands[0]) && optimize_insn_for_size_p ()"
   [(const_int 0)]
   {
 int len = GET_MODE_BITSIZE (mode) - INTVAL (operands[3]);
-- 
2.45.2



[PATCH] LoongArch: Tweak IOR rtx_cost for bstrins

2024-06-15 Thread Xi Ruoyao
Consider

c &= 0xfff;
a &= ~0xfff;
b &= ~0xfff;
a |= c;
b |= c;

This can be done with 2 bstrins instructions.  But we need to recognize
it in loongarch_rtx_costs or the compiler will not propagate "c & 0xfff"
forward.

gcc/ChangeLog:

* config/loongarch/loongarch.cc:
(loongarch_use_bstrins_for_ior_with_mask): Split the main logic
into ...
(loongarch_use_bstrins_for_ior_with_mask_1): ... here.
(loongarch_rtx_costs): Special case for IOR those can be
implemented with bstrins.

gcc/testsuite/ChangeLog;

* gcc.target/loongarch/bstrins-3.c: New test.
---

Bootstrapped and regtested on loongarch64-linux-gnu.  Ok for trunk?

 gcc/config/loongarch/loongarch.cc | 73 ++-
 .../gcc.target/loongarch/bstrins-3.c  | 16 
 2 files changed, 72 insertions(+), 17 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/loongarch/bstrins-3.c

diff --git a/gcc/config/loongarch/loongarch.cc 
b/gcc/config/loongarch/loongarch.cc
index 6ec3ee62502..23cd943d848 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -3681,6 +3681,27 @@ loongarch_set_reg_reg_piece_cost (machine_mode mode, 
unsigned int units)
   return COSTS_N_INSNS ((GET_MODE_SIZE (mode) + units - 1) / units);
 }
 
+static int
+loongarch_use_bstrins_for_ior_with_mask_1 (machine_mode mode,
+  unsigned HOST_WIDE_INT mask1,
+  unsigned HOST_WIDE_INT mask2)
+{
+  if (mask1 != ~mask2 || !mask1 || !mask2)
+return 0;
+
+  /* Try to avoid a right-shift.  */
+  if (low_bitmask_len (mode, mask1) != -1)
+return -1;
+
+  if (low_bitmask_len (mode, mask2 >> (ffs_hwi (mask2) - 1)) != -1)
+return 1;
+
+  if (low_bitmask_len (mode, mask1 >> (ffs_hwi (mask1) - 1)) != -1)
+return -1;
+
+  return 0;
+}
+
 /* Return the cost of moving between two registers of mode MODE.  */
 
 static int
@@ -3812,6 +3833,38 @@ loongarch_rtx_costs (rtx x, machine_mode mode, int 
outer_code,
   /* Fall through.  */
 
 case IOR:
+  {
+   rtx op0 = XEXP (x, 0), op1 = XEXP (x, 1);
+   if (GET_CODE (op0) == AND && GET_CODE (op1) == AND
+   && (mode == SImode || (TARGET_64BIT && mode == DImode)))
+ {
+   rtx rtx_mask0 = XEXP (op0, 1), rtx_mask1 = XEXP (op1, 1);
+   if (CONST_INT_P (rtx_mask0) && CONST_INT_P (rtx_mask1))
+ {
+   unsigned HOST_WIDE_INT mask0 = UINTVAL (rtx_mask0);
+   unsigned HOST_WIDE_INT mask1 = UINTVAL (rtx_mask1);
+   if (loongarch_use_bstrins_for_ior_with_mask_1 (mode,
+  mask0,
+  mask1))
+ {
+   /* A bstrins instruction */
+   *total = COSTS_N_INSNS (1);
+
+   /* A srai instruction */
+   if (low_bitmask_len (mode, mask0) == -1
+   && low_bitmask_len (mode, mask1) == -1)
+ *total += COSTS_N_INSNS (1);
+
+   for (int i = 0; i < 2; i++)
+ *total += set_src_cost (XEXP (op0, i), mode, speed);
+
+   return true;
+ }
+ }
+ }
+  }
+
+  /* Fall through.  */
 case XOR:
   /* Double-word operations use two single-word operations.  */
   *total = loongarch_binary_cost (x, COSTS_N_INSNS (1), COSTS_N_INSNS (2),
@@ -5796,23 +5849,9 @@ bool loongarch_pre_reload_split (void)
 int
 loongarch_use_bstrins_for_ior_with_mask (machine_mode mode, rtx *op)
 {
-  unsigned HOST_WIDE_INT mask1 = UINTVAL (op[2]);
-  unsigned HOST_WIDE_INT mask2 = UINTVAL (op[4]);
-
-  if (mask1 != ~mask2 || !mask1 || !mask2)
-return 0;
-
-  /* Try to avoid a right-shift.  */
-  if (low_bitmask_len (mode, mask1) != -1)
-return -1;
-
-  if (low_bitmask_len (mode, mask2 >> (ffs_hwi (mask2) - 1)) != -1)
-return 1;
-
-  if (low_bitmask_len (mode, mask1 >> (ffs_hwi (mask1) - 1)) != -1)
-return -1;
-
-  return 0;
+  return loongarch_use_bstrins_for_ior_with_mask_1 (mode,
+   UINTVAL (op[2]),
+   UINTVAL (op[4]));
 }
 
 /* Rewrite a MEM for simple load/store under -mexplicit-relocs=auto
diff --git a/gcc/testsuite/gcc.target/loongarch/bstrins-3.c 
b/gcc/testsuite/gcc.target/loongarch/bstrins-3.c
new file mode 100644
index 000..13762bdef42
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/bstrins-3.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-rtl-final" } */
+/* { dg-final { scan-rtl-dump-times "insv\[sd\]i" 2 "final" } } */
+
+struct X {
+  long a, b;
+};
+
+struct X
+test (long a, long b, long c)
+{
+  c &= 0xfff;
+  a &= ~0xfff;
+  b &= ~0xfff;
+  return (struct X){.a = a | c, .b = b | c}; 
+}
-- 
2.45.2

[Bug target/113341] Using GCC as the bootstrap compiler breaks LLVM on 32-bit PowerPC

2024-06-15 Thread glaubitz at physik dot fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113341

--- Comment #13 from John Paul Adrian Glaubitz  ---
(In reply to Andrew Pinski from comment #7)
> `-fno-lifetime-dse` is already used but I get the feeling there might be
> strict aliasing issues in the code though.  What happens if you add
> -fno-strict-aliasing ?
> 
> This code gives me strict aliasing violation vibes:
> ```
> T **getAddressOfPointer(ExternalASTSource *Source) const {
> // Ensure the integer is in pointer form.
> (void)get(Source);
> return reinterpret_cast();
>   }
> ```

I tried with the following diff but that did not fix the issue:

diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake
b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 5ca580fbb59c..51c470dcc3ed 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -679,7 +679,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
   # crash if LLVM is built with GCC and LTO enabled (#57740).  Until
   # these bugs are fixed, we need to disable dead store eliminations
   # based on object lifetime.
-  append("-fno-lifetime-dse" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+  append("-fno-lifetime-dse -fno-strict-aliasing" CMAKE_C_FLAGS
CMAKE_CXX_FLAGS)
 endif ()

 # Modules enablement for GCC-compatible compilers:

[Bug target/113341] Using GCC as the bootstrap compiler breaks LLVM on 32-bit PowerPC

2024-06-15 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113341

Xi Ruoyao  changed:

   What|Removed |Added

 CC||xry111 at gcc dot gnu.org

--- Comment #12 from Xi Ruoyao  ---
(In reply to John Paul Adrian Glaubitz from comment #11)
> (In reply to John Paul Adrian Glaubitz from comment #10)
> > (In reply to Kewen Lin from comment #9)
> > > Since it's a breakage during stage2, it's concluded that some built stage1
> > > stuffs behave unexpectedly.  You probably can try to run regression 
> > > testing
> > > just with stage1 compiler to see if there is any regression exposed.
> > > 
> > > If without any luck, then you probably have to isolate into one or several
> > > object files, since you have "objects" for "good" and "bad" stage1 
> > > compiler,
> > > you can be able to isolate some in between further. Once you get some
> > > isolated, you can probably get some hints it's a bug in LLVM source or 
> > > gcc.
> > 
> > Thanks. This sounds like a good idea. I will try to identify the object
> > files that differ.
> 
> First result of the comparison is that Clang and GCC are building with
> different flags:
> 
> Clang-only flags: -Werror=unguarded-availability-new
> -Wc++98-compat-extra-semi -Wcovered-switch-default -Wnon-virtual-dtor
> -Wstring-conversion -Wmisleading-indentation
> 
> GCC-only flags:  -fno-lifetime-dse-Wno-missing-field-initializers  
> -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess
> -Wno-redundant-move -Wno-pessimizing-move-Wno-comment
> -Wno-misleading-indentation
> 
> I'll upload the build results later to my cloud space if anyone wants to
> help debug as the diff between the two build folders is rather big.

-Wxxx shouldn't have an effect on code generation.  -fno-lifetime-dse is quite
intentional, see PR106943.

[Bug libstdc++/111639] HAVE_ACOSF etc. are wrong on avr

2024-06-15 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111639

--- Comment #9 from Georg-Johann Lay  ---
(In reply to Jonathan Wakely from comment #1)
> since float, double and long double all seem to be the same size on avr

Not necessarily. Since GCC v10, the default for long double is 64 bit (IEEE
double), but [long] double is also switchable per -m[long-]double={32,64}.

https://gcc.gnu.org/gcc-10/changes.html#avr

https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/AVR-Options.html#index-mdouble

Results for 13.3.1 20240615 [releases/gcc-13 r13-8850-g072e71f077] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-06-15 Thread Bill Seurer (POWER9) via Gcc-testresults
 -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 21 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.j == 14
FAIL: gcc.dg/guality/vla-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 25 sizeof (a) == 6 * sizeof 
(int)
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O0  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O1  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O2  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O3 -g  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -Os  execution test
FAIL: gcc.dg/torture/pr52451.c   -O0  execution test
FAIL: gcc.dg/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
FAIL: gcc.dg/torture/pr91323.c   -O0  execution test
FAIL: gcc.dg/torture/pr91323.c   -O1  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr91323.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr91323.c   -Os  execution test
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
FAIL: gcc.target/powerpc/rs6000-fpint.c scan-assembler-not stfiwx
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes170291
# of unexpected failures113
# of unexpected successes   23
# of expected failures  1554
# of unsupported tests  3213
/home/gccbuild/build/nightly/build-gcc-13/gcc/xgcc  version 13.3.1 20240615 
[releases/gcc-13 r13-8850-g072e71f077] (GCC) 

=== gfortran tests ===


Running target unix
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O0  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O1  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O2  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -Os  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O0  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O1  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O2  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -Os  execution test

=== gfortran Summary ===

# of expected passes68348
# of unexpected failures6
# of unexpected successes   6
# of expected failures  271
# of unsupported tests  168
/home/gccbuild/build/nightly/build-gcc-13/gcc/gfortran  version 13.3.1 20240615 
[releases/gcc-1

[gcc r15-1352] RISC-V: Add testcases for vector unsigned SAT_SUB form 2

2024-06-15 Thread Pan Li via Gcc-cvs
https://gcc.gnu.org/g:079506b8aaff878cfc5506241909566f91c624c8

commit r15-1352-g079506b8aaff878cfc5506241909566f91c624c8
Author: Pan Li 
Date:   Sat Jun 15 20:27:01 2024 +0800

RISC-V: Add testcases for vector unsigned SAT_SUB form 2

The previous RISC-V backend .SAT_SUB enabling patch missed the form 2
testcases of vector modes.  Aka:

Form 2:
  #define DEF_VEC_SAT_U_SUB_FMT_2(T)   \
  void __attribute__((noinline))   \
  vec_sat_u_sub_##T##_fmt_2 (T *out, T *op_1, T *op_2, unsigned limit) \
  {\
unsigned i;\
for (i = 0; i < limit; i++)\
  {\
T x = op_1[i]; \
T y = op_2[i]; \
out[i] = (x - y) & (-(T)(x > y));  \
  }\
  }

This patch would like to make it up to ensure form 2 of .SAT_SUB vector
is covered.

Passed the rv64gcv rvv.exp tests.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-5.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-6.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-7.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-8.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-5.c: New 
test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-6.c: New 
test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-7.c: New 
test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-8.c: New 
test.

Signed-off-by: Pan Li 

Diff:
---
 .../riscv/rvv/autovec/binop/vec_sat_u_sub-5.c  | 19 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_sub-6.c  | 20 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_sub-7.c  | 20 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_sub-8.c  | 20 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_sub-run-5.c  | 75 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_sub-run-6.c  | 75 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_sub-run-7.c  | 75 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_sub-run-8.c  | 75 ++
 8 files changed, 379 insertions(+)

diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-5.c 
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-5.c
new file mode 100644
index ..b05f3ad14ee1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-5.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -ftree-vectorize 
-fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
+/* { dg-skip-if "" { *-*-* } { "-flto" } } */
+/* { dg-final { check-function-bodies "**" "" } } */
+
+#include "vec_sat_arith.h"
+
+/*
+** vec_sat_u_sub_uint8_t_fmt_2:
+** ...
+** vsetvli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*e8,\s*m1,\s*ta,\s*ma
+** vle8\.v\s+v[0-9]+,\s*0\([atx][0-9]+\)
+** vle8\.v\s+v[0-9]+,\s*0\([atx][0-9]+\)
+** vssubu\.vv\s+v[0-9]+,\s*v[0-9]+,\s*v[0-9]+
+** ...
+*/
+DEF_VEC_SAT_U_SUB_FMT_2(uint8_t)
+
+/* { dg-final { scan-rtl-dump-times ".SAT_SUB " 4 "expand" } } */
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-6.c 
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-6.c
new file mode 100644
index ..251a53323506
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-6.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -ftree-vectorize 
-fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
+/* { dg-skip-if "" { *-*-* } { "-flto" } } */
+/* { dg-final { check-function-bodies "**" "" } } */
+
+#include "vec_sat_arith.h"
+
+/*
+** vec_sat_u_sub_uint16_t_fmt_2:
+** ...
+** vsetvli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*e16,\s*m1,\s*ta,\s*ma
+** ...
+** vle16\.v\s+v[0-9]+,\s*0\([atx][0-9]+\)
+** vle16\.v\s+v[0-9]+,\s*0\([atx][0-9]+\)
+** vssubu\.vv\s+v[0-9]+,\s*v[0-9]+,\s*v[0-9]+
+** ...
+*/
+DEF_VEC_SAT_U_SUB_FMT_2(uint16_t)
+
+/* { dg-final { scan-rtl-dump-times ".SAT_SUB " 4 "expand" } } */
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-7.c 
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-7.c
new file mode 100644
index ..23fc3dcb1fd2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-7.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options 

[Bug pch/115312] [14/15 Regression] ICE when including a PCH via compiler option -include

2024-06-15 Thread brechtsanders at users dot sourceforge.net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115312

--- Comment #4 from Brecht Sanders  
---
No, that patch wasn't added for my build, see my build recipe here:
https://github.com/brechtsanders/winlibs_recipes/blob/main/recipes/gcc.winlib

Re: [PATCH] libstdc++: Do not use memset _Hashtable buckets allocation

2024-06-15 Thread François Dumont

Here is the simplified patch then.

    libstdc++: Do not use memset in _Hashtable buckets allocation

    Using memset is incorrect if the __bucket_ptr type is non-trivial, or
    does not use an all-zero bit pattern for its null value.

    Replace the use of memset with std::__uinitialized_default_n to set the
    pointers to nullptr. Doing so and corresponding std::_Destroy_n 
when deallocating

    buckets.

    libstdc++-v3/ChangeLog:

    * include/bits/hashtable_policy.h
    (_Hashtable_alloc::_M_allocate_buckets): Do not use memset 
to zero

    out bucket pointers.
    (_Hashtable_alloc::_M_deallocate_buckets): Add destroy of 
buckets.


Tested under Linux x64, ok to commit ?

François

On 13/06/2024 20:58, Jonathan Wakely wrote:

On Thu, 13 Jun 2024 at 19:57, Jonathan Wakely  wrote:

On Thu, 13 Jun 2024 at 18:40, François Dumont  wrote:

Hi

Following your recent change here:

https://gcc.gnu.org/pipermail/libstdc++/2024-June/058998.html

I think we also need to fix the memset at bucket allocation level.

I did it trying also to be more fancy pointer friendly by running
__uninitialized_default_n_a on the allocator returned pointer rather
than on the __to_address result. I wonder if an __uninitialized_fill_n_a
would have been better ? Doing so I also had to call std::_Destroy on
deallocation. Let me know if it is too early.

You don't need the RAII guard. Initializing Alloc::pointer isn't
allowed to throw exceptions:

"An allocator type X shall meet the Cpp17CopyConstructible
requirements (Table 32). The XX::pointer,
XX::const_pointer, XX::void_pointer, and XX::const_void_pointer types
shall meet the Cpp17Nullable-
Pointer requirements (Table 36). No constructor, comparison operator
function, copy operation, move
operation, or swap operation on these pointer types shall exit via an
exception."

And you should not pass the allocator to the __uninitialized_xxx call,
nor the _Destroy call. We don't want to use the allocator's
construct/destroy members for those pointers. They are not container
elements.

I think either uninitialized_fill_n with nullptr or
__uninitialized_default_n is fine. Not the _a forms taking an
allocator though.

And I'd use _Destroy_n(_M_buckets, _M_bucket_count)



I also wonder if the compiler will be able to optimize it to a memset
call ? I'm interested to work on it if you confirm that it won't.

It will do whatever is fastest, which might be memset or might be
vectorized code to zero it out (which is probably what libc memset
does too).


libstdc++: Do not use memset in _Hashtable buckets allocation

Using memset is incorrect if the __bucket_ptr type is non-trivial, or
does not use an all-zero bit pattern for its null value.

Replace the use of memset with std::__uinitialized_default_n_a to set the
pointers to nullptr. Doing so and corresponding std::_Destroy when
deallocating
buckets.

libstdc++-v3/ChangeLog:

  * include/bits/hashtable_policy.h
  (_Hashtable_alloc::_M_allocate_buckets): Do not use memset to zero
  out bucket pointers.
  (_Hashtable_alloc::_M_deallocate_buckets): Add destroy of buckets.


I hope you won't ask for copy rights on the changelog entry :-)

Tested under Linux x64, ok to commit ?

Françoisdiff --git a/libstdc++-v3/include/bits/hashtable_policy.h 
b/libstdc++-v3/include/bits/hashtable_policy.h
index 26def24f24e..510108a1a6f 100644
--- a/libstdc++-v3/include/bits/hashtable_policy.h
+++ b/libstdc++-v3/include/bits/hashtable_policy.h
@@ -33,8 +33,9 @@
 
 #include// for std::tuple, std::forward_as_tuple
 #include  // for __is_fast_hash
-#include  // for std::min, std::is_permutation.
+#include  // for std::min, std::is_permutation
 #include  // for std::pair
+#include  // for __uninitialized_default_n
 #include // for __gnu_cxx::__aligned_buffer
 #include   // for std::__alloc_rebind
 #include // for __gnu_cxx::__int_traits
@@ -2069,11 +2070,9 @@ namespace __detail
 -> __buckets_ptr
 {
   __buckets_alloc_type __alloc(_M_node_allocator());
-
   auto __ptr = __buckets_alloc_traits::allocate(__alloc, __bkt_count);
-  __buckets_ptr __p = std::__to_address(__ptr);
-  __builtin_memset(__p, 0, __bkt_count * sizeof(__node_base_ptr));
-  return __p;
+  std::__uninitialized_default_n(__ptr, __bkt_count);
+  return std::__to_address(__ptr);
 }
 
   template
@@ -2085,6 +2084,7 @@ namespace __detail
   typedef typename __buckets_alloc_traits::pointer _Ptr;
   auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__bkts);
   __buckets_alloc_type __alloc(_M_node_allocator());
+  std::_Destroy_n(__ptr, __bkt_count);
   __buckets_alloc_traits::deallocate(__alloc, __ptr, __bkt_count);
 }
 


Re: [PATCH v1] RISC-V: Add testcases for vector unsigned SAT_SUB form 2

2024-06-15 Thread ??????
lgtm








 --Reply to Message--
 On Sat, Jun 15, 2024 20:56 PM Li, Pan2

[Bug libstdc++/115497] [15 Regression] __is_pointer doesn't compile with clang since 014879ea4c86b3b8ab6b61a1226ee5b31e816c8b

2024-06-15 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115497

Arthur O'Dwyer  changed:

   What|Removed |Added

 CC||arthur.j.odwyer at gmail dot 
com

--- Comment #8 from Arthur O'Dwyer  ---
FWIW, I also ran into this, this morning.
Reduced: https://godbolt.org/z/rxYKTqKd4
Organically in Abseil: https://godbolt.org/z/9eoqKzYjc
(This happens because Abseil #includes  before 
(alphabetically). If you switch the order of those two includes, it Just
Works.)

IMVHO libstdc++ should do jwakely's idea of #include  from the
offending header file; that's the most foolproof O(1) solution, rather than the
O(N) solution of being really careful to always write `bool(__is_foo(T))`
instead of `__is_foo(T)`. Also, there are definitely third-party libraries
(like Abseil) out there who legitimately want to use `__is_pointer(T)` in their
own code, and right now they have no idea that they ought to write all their
uses with an extra `bool` cast just to work around a problematic interaction
between Clang and libstdc++ (a mode they probably don't even build in their
CI). So fixing the problem once and for all on libstdc++'s side of the fence
would be really helpful.

[PATCH v1] RISC-V: Add testcases for vector unsigned SAT_SUB form 2

2024-06-15 Thread pan2 . li
From: Pan Li 

The previous RISC-V backend .SAT_SUB enabling patch missed the form 2
testcases of vector modes.  Aka:

Form 2:
  #define DEF_VEC_SAT_U_SUB_FMT_2(T)   \
  void __attribute__((noinline))   \
  vec_sat_u_sub_##T##_fmt_2 (T *out, T *op_1, T *op_2, unsigned limit) \
  {\
unsigned i;\
for (i = 0; i < limit; i++)\
  {\
T x = op_1[i]; \
T y = op_2[i]; \
out[i] = (x - y) & (-(T)(x > y));  \
  }\
  }

This patch would like to make it up to ensure form 2 of .SAT_SUB vector
is covered.

Passed the rv64gcv rvv.exp tests.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-5.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-6.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-7.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-8.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-5.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-6.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-7.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-8.c: New test.

Signed-off-by: Pan Li 
---
 .../riscv/rvv/autovec/binop/vec_sat_u_sub-5.c | 19 +
 .../riscv/rvv/autovec/binop/vec_sat_u_sub-6.c | 20 +
 .../riscv/rvv/autovec/binop/vec_sat_u_sub-7.c | 20 +
 .../riscv/rvv/autovec/binop/vec_sat_u_sub-8.c | 20 +
 .../rvv/autovec/binop/vec_sat_u_sub-run-5.c   | 75 +++
 .../rvv/autovec/binop/vec_sat_u_sub-run-6.c   | 75 +++
 .../rvv/autovec/binop/vec_sat_u_sub-run-7.c   | 75 +++
 .../rvv/autovec/binop/vec_sat_u_sub-run-8.c   | 75 +++
 8 files changed, 379 insertions(+)
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-5.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-6.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-7.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-8.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-5.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-6.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-7.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-8.c

diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-5.c 
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-5.c
new file mode 100644
index 000..b05f3ad14ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-5.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -ftree-vectorize 
-fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
+/* { dg-skip-if "" { *-*-* } { "-flto" } } */
+/* { dg-final { check-function-bodies "**" "" } } */
+
+#include "vec_sat_arith.h"
+
+/*
+** vec_sat_u_sub_uint8_t_fmt_2:
+** ...
+** vsetvli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*e8,\s*m1,\s*ta,\s*ma
+** vle8\.v\s+v[0-9]+,\s*0\([atx][0-9]+\)
+** vle8\.v\s+v[0-9]+,\s*0\([atx][0-9]+\)
+** vssubu\.vv\s+v[0-9]+,\s*v[0-9]+,\s*v[0-9]+
+** ...
+*/
+DEF_VEC_SAT_U_SUB_FMT_2(uint8_t)
+
+/* { dg-final { scan-rtl-dump-times ".SAT_SUB " 4 "expand" } } */
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-6.c 
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-6.c
new file mode 100644
index 000..251a5332350
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-6.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -ftree-vectorize 
-fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
+/* { dg-skip-if "" { *-*-* } { "-flto" } } */
+/* { dg-final { check-function-bodies "**" "" } } */
+
+#include "vec_sat_arith.h"
+
+/*
+** vec_sat_u_sub_uint16_t_fmt_2:
+** ...
+** vsetvli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*e16,\s*m1,\s*ta,\s*ma
+** ...
+** vle16\.v\s+v[0-9]+,\s*0\([atx][0-9]+\)
+** vle16\.v\s+v[0-9]+,\s*0\([atx][0-9]+\)
+** vssubu\.vv\s+v[0-9]+,\s*v[0-9]+,\s*v[0-9]+
+** ...
+*/
+DEF_VEC_SAT_U_SUB_FMT_2(uint16_t)
+
+/* { dg-final { scan-rtl-dump-times ".SAT_SUB " 4 "expand" } } */
diff --git 

[Bug c++/115504] New: Wrong decltype result for a captured reference inside limbda

2024-06-15 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115504

Bug ID: 115504
   Summary: Wrong decltype result for a captured reference inside
limbda
   Product: gcc
   Version: 14.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

This program
```
template int foo() = delete;
template<> int foo() { return 0; }

int main() { 
int y = 0;
int  = y;
return []() {
decltype(auto) x = i;
return foo();
}();
}
```
is accepted in Clang, MSVC and GCC 13.3, but not in GCC 14, which thinks that
`decltype(x)=int`. Online demo: https://gcc.godbolt.org/z/fc1nrP4P9

Related discussion: https://stackoverflow.com/a/78626163/7325599

Ping^2: [PATCH 0/3] Recover in-tree libiconv build support

2024-06-15 Thread Arsen Arsenović
Hi!

Another gentle ping on this patch series.  Could it be merged into
trunk?

TIA, have a lovely day!
-- 
Arsen Arsenović


signature.asc
Description: PGP signature


  1   2   >