[PATCH] libstdc++: Update baseline symbols for riscv64-linux

2024-04-15 Thread Andreas Schwab


* config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
---
 .../config/abi/post/riscv64-linux-gnu/baseline_symbols.txt| 4 
 1 file changed, 4 insertions(+)

diff --git 
a/libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt 
b/libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt
index 9423cfb8efc..9229ad33458 100644
--- a/libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt
+++ b/libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt
@@ -499,6 +499,10 @@ FUNC:_ZNKSt11__timepunctIwE9_M_monthsEPPKw@@GLIBCXX_3.4
 FUNC:_ZNKSt11logic_error4whatEv@@GLIBCXX_3.4
 FUNC:_ZNKSt12__basic_fileIcE13native_handleEv@@GLIBCXX_3.4.33
 FUNC:_ZNKSt12__basic_fileIcE7is_openEv@@GLIBCXX_3.4
+FUNC:_ZNKSt12__shared_ptrINSt10filesystem28recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
+FUNC:_ZNKSt12__shared_ptrINSt10filesystem4_DirELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
+FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx1128recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
+FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx114_DirELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
 FUNC:_ZNKSt12bad_weak_ptr4whatEv@@GLIBCXX_3.4.15
 FUNC:_ZNKSt12future_error4whatEv@@GLIBCXX_3.4.14
 FUNC:_ZNKSt12strstreambuf6pcountEv@@GLIBCXX_3.4
-- 
2.44.0


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] libstdc++: Regenerate trunk baseline_symbols.txt files for Linux

2024-04-11 Thread Andreas Schwab
On Apr 11 2024, Jakub Jelinek wrote:

> On Thu, Apr 11, 2024 at 04:35:52PM +0200, Andreas Schwab wrote:
>> +FUNC:_ZNKSt12__shared_ptrINSt10filesystem28recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
>> +FUNC:_ZNKSt12__shared_ptrINSt10filesystem4_DirELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
>> +FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx1128recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
>> +FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx114_DirELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
>
> If there are other changes needed for m68k, it means it wasn't regenerated
> properly before the 13.1 release a year ago.

Why do you think this has anything to do with m68k?

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] libstdc++: Regenerate trunk baseline_symbols.txt files for Linux

2024-04-11 Thread Andreas Schwab
On Apr 11 2024, Jakub Jelinek wrote:

> --- libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt.jj
> 2024-04-11 15:55:49.982325397 +0200
> +++ libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt   
> 2024-04-11 16:10:05.206559463 +0200
> @@ -497,6 +497,7 @@ FUNC:_ZNKSt11__timepunctIwE7_M_daysEPPKw
>  FUNC:_ZNKSt11__timepunctIwE8_M_am_pmEPPKw@@GLIBCXX_3.4
>  FUNC:_ZNKSt11__timepunctIwE9_M_monthsEPPKw@@GLIBCXX_3.4
>  FUNC:_ZNKSt11logic_error4whatEv@@GLIBCXX_3.4
> +FUNC:_ZNKSt12__basic_fileIcE13native_handleEv@@GLIBCXX_3.4.33
>  FUNC:_ZNKSt12__basic_fileIcE7is_openEv@@GLIBCXX_3.4
>  FUNC:_ZNKSt12bad_weak_ptr4whatEv@@GLIBCXX_3.4.15
>  FUNC:_ZNKSt12future_error4whatEv@@GLIBCXX_3.4.14
> @@ -4525,6 +4526,7 @@ FUNC:__cxa_allocate_exception@@CXXABI_1.
>  FUNC:__cxa_bad_cast@@CXXABI_1.3
>  FUNC:__cxa_bad_typeid@@CXXABI_1.3
>  FUNC:__cxa_begin_catch@@CXXABI_1.3
> +FUNC:__cxa_call_terminate@@CXXABI_1.3.15
>  FUNC:__cxa_call_unexpected@@CXXABI_1.3
>  FUNC:__cxa_current_exception_type@@CXXABI_1.3
>  FUNC:__cxa_deleted_virtual@@CXXABI_1.3.6
> @@ -4568,6 +4570,7 @@ OBJECT:0:CXXABI_1.3.11
>  OBJECT:0:CXXABI_1.3.12
>  OBJECT:0:CXXABI_1.3.13
>  OBJECT:0:CXXABI_1.3.14
> +OBJECT:0:CXXABI_1.3.15
>  OBJECT:0:CXXABI_1.3.2
>  OBJECT:0:CXXABI_1.3.3
>  OBJECT:0:CXXABI_1.3.4
> @@ -4604,6 +4607,7 @@ OBJECT:0:GLIBCXX_3.4.3
>  OBJECT:0:GLIBCXX_3.4.30
>  OBJECT:0:GLIBCXX_3.4.31
>  OBJECT:0:GLIBCXX_3.4.32
> +OBJECT:0:GLIBCXX_3.4.33
>  OBJECT:0:GLIBCXX_3.4.4
>  OBJECT:0:GLIBCXX_3.4.5
>  OBJECT:0:GLIBCXX_3.4.6

+FUNC:_ZNKSt12__shared_ptrINSt10filesystem28recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
+FUNC:_ZNKSt12__shared_ptrINSt10filesystem4_DirELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
+FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx1128recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
+FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx114_DirELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] libstdc++: Regenerate baseline_symbols.txt files for Linux

2024-04-11 Thread Andreas Schwab
XXABI_1.3
 FUNC:__cxa_deleted_virtual@@CXXABI_1.3.6
@@ -4566,6 +4574,7 @@ OBJECT:0:CXXABI_1.3.11
 OBJECT:0:CXXABI_1.3.12
 OBJECT:0:CXXABI_1.3.13
 OBJECT:0:CXXABI_1.3.14
+OBJECT:0:CXXABI_1.3.15
 OBJECT:0:CXXABI_1.3.2
 OBJECT:0:CXXABI_1.3.3
 OBJECT:0:CXXABI_1.3.4
-- 
2.44.0


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] Regenerate opt.urls

2024-04-10 Thread Andreas Schwab
On Apr 09 2024, Palmer Dabbelt wrote:

> I didn't actually regenerate this as I can't figure out how,

make regenerate-opt-urls

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH v2] RISC-V: Bugfix ICE for __attribute__((target("arch=+v"))

2024-03-30 Thread Andreas Schwab
../../gcc/common/config/riscv/riscv-common.cc: In static member function 
'static riscv_subset_list* riscv_subset_list::parse(const char*, location_t)':
../../gcc/common/config/riscv/riscv-common.cc:1501:19: error: unused variable 
'itr' [-Werror=unused-variable]
 1501 |   riscv_subset_t *itr;
  |   ^~~
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:2563: riscv-common.o] Error 1

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH v1] RISC-V: Allow RVV intrinsic when function target("arch=+v")

2024-03-29 Thread Andreas Schwab
../../gcc/config/riscv/riscv-vector-builtins.cc: In function 'rtx_def* 
riscv_vector::expand_builtin(unsigned int, tree, rtx)':
../../gcc/config/riscv/riscv-vector-builtins.cc:4592:16: error: misspelled term 
'builtin function' in format; use 'built-in function' instead 
[-Werror=format-diag]
 4592 |   "builtin function %qE requires the V ISA extension", exp);
  |^~~~
cc1plus: all warnings being treated as errors
make[3]: *** [../../gcc/config/riscv/t-riscv:28: riscv-vector-builtins.o] Error 
1

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] aarch64: Add +lse128 architectural extension command-line flag

2024-03-26 Thread Andreas Schwab
On Mär 15 2024, Victor Do Nascimento wrote:

> \ No newline at end of file

Please fix that.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] s390: Fix TARGET_SECONDARY_RELOAD for non-SYMBOL_REFs

2024-02-29 Thread Andreas Schwab
On Feb 29 2024, Stefan Schulze Frielinghaus wrote:

> RTX X must not necessarily be a SYMBOL_REF and may e.g. be an

False friend: s/must not/need not/

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


[PATCH] Skip gnat.dg/div_zero.adb on RISC-V

2024-02-14 Thread Andreas Schwab
Like AArch64 and POWER, RISC-V does not support trap on zero divide.

gcc/testsuite/
* gnat.dg/div_zero.adb: Skip on RISC-V.
---
 gcc/testsuite/gnat.dg/div_zero.adb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gnat.dg/div_zero.adb 
b/gcc/testsuite/gnat.dg/div_zero.adb
index dedf3928db7..fb1c98caeff 100644
--- a/gcc/testsuite/gnat.dg/div_zero.adb
+++ b/gcc/testsuite/gnat.dg/div_zero.adb
@@ -1,5 +1,5 @@
 -- { dg-do run }
--- { dg-skip-if "divide does not trap" { aarch64*-*-* powerpc*-*-* } }
+-- { dg-skip-if "divide does not trap" { aarch64*-*-* powerpc*-*-* riscv*-*-* 
} }
 
 -- This test requires architecture- and OS-specific support code for unwinding
 -- through signal frames (typically located in *-unwind.h) to pass.  Feel free
-- 
2.43.1


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH v1] RISC-V: Bugfix for RVV overloaded intrinisc ICE when empty args

2024-02-10 Thread Andreas Schwab
WTF?

../../gcc/config/riscv/riscv-vector-builtins.cc: In function 'tree_node* 
riscv_vector::resolve_overloaded_builtin(location_t, unsigned int, tree, 
vec*)':
../../gcc/config/riscv/riscv-vector-builtins.cc:4633:65: error: misspelled term 
'args' in format; use 'arguments' instead [-Werror=format-diag]
 4633 | error_at (loc, "no matching function call to %qE with empty args", 
fndecl);
  | ^~~

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH v2] RISC-V: THEAD: Fix improper immediate value for MODIFY_DISP instruction on 32-bit systems.

2024-02-05 Thread Andreas Schwab
On Feb 05 2024, Jeff Law wrote:

> We're all aware you *can* do that.  But it's never been a requirement to
> commit a patch.

It has always been a requirement that a patch does not break bootstrap.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH v2] RISC-V: THEAD: Fix improper immediate value for MODIFY_DISP instruction on 32-bit systems.

2024-02-05 Thread Andreas Schwab
On Feb 05 2024, Jeff Law wrote:

> Until such systems are common, these niggling issues are bound to show up.

It won't if you do it properly: build with a cross compiler that was
built from the same source and enable -Werror.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH v2] RISC-V: THEAD: Fix improper immediate value for MODIFY_DISP instruction on 32-bit systems.

2024-02-03 Thread Andreas Schwab
On Jan 30 2024, Christoph Müllner wrote:

> retested

Nope.

../../gcc/config/riscv/thead.cc:1144:22: error: invalid suffix on literal; 
C++11 requires a space between literal and string macro [-Werror=literal-suffix]
 1144 |   fprintf (file, "(%s),"HOST_WIDE_INT_PRINT_DEC",%u", 
reg_names[REGNO (addr.reg)],
  |  ^
cc1plus: all warnings being treated as errors
make[3]: *** [../../gcc/config/riscv/t-riscv:127: thead.o] Error 1

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH 1/2] libstdc++: Replace padding bits with a bit-field in __format::_Spec

2024-02-01 Thread Andreas Schwab
On Feb 01 2024, Jonathan Wakely wrote:

> This will result in an ABI change for targets that use 1-byte alignment
> for all integral types, e.g. cris-elf.

Or 2-byte alignment as on m68k.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [Committed] RISC-V: Suppress warning

2024-01-21 Thread Andreas Schwab
On Jan 21 2024, Jeff Law wrote:

> Yea.  The biggest problem with ATTRIBUTE_UNUSED is that it's a "may be
> unused" and thus if the code changes it's sometimes left on an parameter
> incorrectly.  C++ allows us to specify a "is definitely unused" concept by
> dropping the parameter's name, but leaving its type.

It's problematic if the parameter is only used conditionally on a macro
definition (which is less common with target hooks now being function
calls).

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH 1/2] RISC-V: delete all the vector psabi checking.

2024-01-19 Thread Andreas Schwab
../../gcc/config/riscv/riscv.cc: In function 'void 
riscv_init_cumulative_args(CUMULATIVE_ARGS*, tree, rtx, tree, int)':
../../gcc/config/riscv/riscv.cc:4879:34: error: unused parameter 'fndecl' 
[-Werror=unused-parameter]
 4879 | tree fndecl,
  | ~^~
../../gcc/config/riscv/riscv.cc: In function 'bool 
riscv_vector_mode_supported_any_target_p(machine_mode)':
../../gcc/config/riscv/riscv.cc:10537:56: error: unused parameter 'mode' 
[-Werror=unused-parameter]
10537 | riscv_vector_mode_supported_any_target_p (machine_mode mode)
  |   ~^~~~
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:2559: riscv.o] Error 1

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


[PATCH] libstdc++: Update baseline symbols for riscv64-linux

2024-01-17 Thread Andreas Schwab
* config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
---
 .../abi/post/riscv64-linux-gnu/baseline_symbols.txt  | 9 +
 1 file changed, 9 insertions(+)

diff --git 
a/libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt 
b/libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt
index 5ee7f5a0460..a37a0b9a0c9 100644
--- a/libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt
+++ b/libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt
@@ -497,7 +497,12 @@ FUNC:_ZNKSt11__timepunctIwE7_M_daysEPPKw@@GLIBCXX_3.4
 FUNC:_ZNKSt11__timepunctIwE8_M_am_pmEPPKw@@GLIBCXX_3.4
 FUNC:_ZNKSt11__timepunctIwE9_M_monthsEPPKw@@GLIBCXX_3.4
 FUNC:_ZNKSt11logic_error4whatEv@@GLIBCXX_3.4
+FUNC:_ZNKSt12__basic_fileIcE13native_handleEv@@GLIBCXX_3.4.32
 FUNC:_ZNKSt12__basic_fileIcE7is_openEv@@GLIBCXX_3.4
+FUNC:_ZNKSt12__shared_ptrINSt10filesystem28recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
+FUNC:_ZNKSt12__shared_ptrINSt10filesystem4_DirELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
+FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx1128recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
+FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx114_DirELN9__gnu_cxx12_Lock_policyE1EEcvbEv@@GLIBCXX_3.4.31
 FUNC:_ZNKSt12bad_weak_ptr4whatEv@@GLIBCXX_3.4.15
 FUNC:_ZNKSt12future_error4whatEv@@GLIBCXX_3.4.14
 FUNC:_ZNKSt12strstreambuf6pcountEv@@GLIBCXX_3.4
@@ -3210,6 +3215,7 @@ 
FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@@GLIBCX
 
FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@@GLIBCXX_3.4.21
 
FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_S_compareEmm@@GLIBCXX_3.4.21
 
FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_capacityEm@@GLIBCXX_3.4.21
+FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_S_allocateERS3_m@@GLIBCXX_3.4.32
 
FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC1EPcOS3_@@GLIBCXX_3.4.23
 
FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC1EPcRKS3_@@GLIBCXX_3.4.21
 
FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC2EPcOS3_@@GLIBCXX_3.4.23
@@ -3362,6 +3368,7 @@ 
FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE10_M_disposeEv@@GLIBCX
 
FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE10_M_replaceEmmPKwm@@GLIBCXX_3.4.21
 
FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE10_S_compareEmm@@GLIBCXX_3.4.21
 
FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE11_M_capacityEm@@GLIBCXX_3.4.21
+FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE11_S_allocateERS3_m@@GLIBCXX_3.4.32
 
FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_Alloc_hiderC1EPwOS3_@@GLIBCXX_3.4.23
 
FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_Alloc_hiderC1EPwRKS3_@@GLIBCXX_3.4.21
 
FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_Alloc_hiderC2EPwOS3_@@GLIBCXX_3.4.23
@@ -4523,6 +4530,7 @@ FUNC:__cxa_allocate_exception@@CXXABI_1.3
 FUNC:__cxa_bad_cast@@CXXABI_1.3
 FUNC:__cxa_bad_typeid@@CXXABI_1.3
 FUNC:__cxa_begin_catch@@CXXABI_1.3
+FUNC:__cxa_call_terminate@@CXXABI_1.3.15
 FUNC:__cxa_call_unexpected@@CXXABI_1.3
 FUNC:__cxa_current_exception_type@@CXXABI_1.3
 FUNC:__cxa_deleted_virtual@@CXXABI_1.3.6
@@ -4566,6 +4574,7 @@ OBJECT:0:CXXABI_1.3.11
 OBJECT:0:CXXABI_1.3.12
 OBJECT:0:CXXABI_1.3.13
 OBJECT:0:CXXABI_1.3.14
+OBJECT:0:CXXABI_1.3.15
 OBJECT:0:CXXABI_1.3.2
 OBJECT:0:CXXABI_1.3.3
 OBJECT:0:CXXABI_1.3.4
-- 
2.43.0


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


[PATCH] Fix spurious match in extract_symvers

2024-01-09 Thread Andreas Schwab
Tighten the regex to find the start of the .dynsym symtab in the readelf
output to avoid matching the section symbol in the normal symtab.

libstdc++-v3:
* scripts/extract_symvers.in: Require final colon to only match
.dsynsym in the header of the dynamic symtab.
---
 libstdc++-v3/scripts/extract_symvers.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/scripts/extract_symvers.in 
b/libstdc++-v3/scripts/extract_symvers.in
index 17f0d31bd1c..6bb951c7145 100755
--- a/libstdc++-v3/scripts/extract_symvers.in
+++ b/libstdc++-v3/scripts/extract_symvers.in
@@ -52,7 +52,7 @@ SunOS)
   # Omit _DYNAMIC etc. for consistency with extract_symvers.pl, only
   # present on Solaris.
   ${readelf} ${lib} |\
-  sed -e 's/ \[: [A-Fa-f0-9]*\] //' -e '/\.dynsym/,/^$/p;d' |\
+  sed -e 's/ \[: [A-Fa-f0-9]*\] //' -e '/\.dynsym.*:$/,/^$/p;d' |\
   sed -e 's/ \[: [0-9]*\] //' |\
   grep -E -v ' (LOCAL|UND) ' |\
   grep -E -v ' 
(_DYNAMIC|_GLOBAL_OFFSET_TABLE_|_PROCEDURE_LINKAGE_TABLE_|_edata|_end|_etext)$' 
|\
-- 
2.43.0


-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH v3] LoongArch: testsuite:Added support for vector object detection.

2024-01-09 Thread Andreas Schwab
gcc: gcc.dg/vect/vect-outer-4a-big-array.c -flto -ffat-lto-objects: error 
executing dg-final: unknown effective target keyword `loongarch*-*-*'
gcc: gcc.dg/vect/vect-outer-4a-big-array.c: error executing dg-final: unknown 
effective target keyword `loongarch*-*-*'
gcc: gcc.dg/vect/vect-outer-4a.c -flto -ffat-lto-objects: error executing 
dg-final: unknown effective target keyword `loongarch*-*-*'
gcc: gcc.dg/vect/vect-outer-4a.c: error executing dg-final: unknown effective 
target keyword `loongarch*-*-*'
gcc: gcc.dg/vect/vect-outer-4b-big-array.c -flto -ffat-lto-objects: error 
executing dg-final: unknown effective target keyword `loongarch*-*-*'
gcc: gcc.dg/vect/vect-outer-4b-big-array.c: error executing dg-final: unknown 
effective target keyword `loongarch*-*-*'
gcc: gcc.dg/vect/vect-outer-4b.c -flto -ffat-lto-objects: error executing 
dg-final: unknown effective target keyword `loongarch*-*-*'
gcc: gcc.dg/vect/vect-outer-4b.c: error executing dg-final: unknown effective 
target keyword `loongarch*-*-*'

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


[PATCH] libsanitizer: Enable LSan and TSan for riscv64

2024-01-02 Thread Andreas Schwab
All new (tsan) tests are working as expected.

* configure.tgt (riscv64-*-linux*): Enable LSan and TSan.
---
 libsanitizer/configure.tgt | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libsanitizer/configure.tgt b/libsanitizer/configure.tgt
index d24566a2343..38fc7001ff7 100644
--- a/libsanitizer/configure.tgt
+++ b/libsanitizer/configure.tgt
@@ -72,6 +72,11 @@ case "${target}" in
   x86_64-*-solaris2.11* | i?86-*-solaris2.11*)
;;
   riscv64-*-linux*)
+   if test x$ac_cv_sizeof_void_p = x8; then
+   TSAN_SUPPORTED=yes
+   LSAN_SUPPORTED=yes
+   TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_riscv64.lo
+   fi
;;
   loongarch64-*-linux*)
;;
-- 
2.43.0


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [commit v3 1/2] MIPS: Put the ret to the end of args of reconcat [PR112759]

2023-12-23 Thread Andreas Schwab
On Dez 23 2023, YunQiang Su wrote:

> diff --git a/gcc/config/mips/driver-native.cc 
> b/gcc/config/mips/driver-native.cc
> index afc276f5278..4ef48e14916 100644
> --- a/gcc/config/mips/driver-native.cc
> +++ b/gcc/config/mips/driver-native.cc
> @@ -44,6 +44,8 @@ const char *
>  host_detect_local_cpu (int argc, const char **argv)
>  {
>const char *cpu = NULL;
> +  /* Don't assigne any static string to ret.  If you need to do so,
      assign

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] gcc: Disallow trampolines when -fhardened

2023-12-04 Thread Andreas Schwab
On Dez 04 2023, Siddhesh Poyarekar wrote:

> For hardened code in C, I think we really should look to step away from
> nested functions instead of adding ways to continue supporting it. There's
> probably a larger conversation to be had about the utility of nested
> functions in general for C (and whether this GCC extension should be
> deprecated altogether in future), but I feel like the -fhardened subset
> gives us the opportunity to enforce at least a safe subset for now,
> possibly extending it in future.

Nested functions by itself don't need a trampoline, only if the address
of it is passed outside the containing function's scope (as a callback,
for example).

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [wwwdocs][patch][OpenACC] gcc-14/changes.html: OpenACC - mention support for first 2.7 features

2023-11-26 Thread Andreas Schwab
On Nov 26 2023, Gerald Pfeifer wrote:

> On Fri, 24 Nov 2023, Tobias Burnus wrote:
>> Comments before I commit it?
>
> +  https://gcc.gnu.org/wiki/OpenACC;>OpenACC
> +OpenACC 2.7: The self clause was added to be used on
> +  compute constructs and the default clause for data
> +  constructs.


> +  
> +  
>
> Where does that  come from? I'm afraid this won't validate/render 
> properly.

Neither that extra , I think.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH v2] RISC-V: Implement target attribute

2023-11-17 Thread Andreas Schwab
rror=mismatched-new-delete]
   93 | delete __ptr;
  | ^~~~
In member function 'bool 
{anonymous}::riscv_target_attr_parser::parse_arch(const char*)',
inlined from 'bool {anonymous}::riscv_target_attr_parser::handle_arch(const 
char*)' at ../../gcc/config/riscv/riscv-target-attr.cc:158:21:
../../gcc/config/riscv/riscv-target-attr.cc:108:46: note: returned from 'void* 
operator new [](std::size_t)'
  108 |   std::unique_ptr buf (new char[len]);
  |  ^
cc1plus: all warnings being treated as errors
make[3]: *** [../../gcc/config/riscv/t-riscv:120: riscv-target-attr.o] Error 1

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] Fix configure script comments(!?!)

2023-11-06 Thread Andreas Schwab
On Nov 06 2023, Martin Jambor wrote:

> Following this commit, our buildbot script which checks that configure
> scripts where re-generated correctly is unhappy because it insists
> comments are wrong, it wants to them to be like this:
>
> 
> diff --git a/gcc/configure b/gcc/configure
> index 4d0357cbc28..0d818ae6850 100755
> --- a/gcc/configure
> +++ b/gcc/configure
> @@ -2,7 +2,7 @@ else
>lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
>lt_status=$lt_dlunknown
>cat > conftest.$ac_ext <<_LT_EOF
> -#line 19995 "configure"
> +#line 20003 "configure"
>  #include "confdefs.h"
>  
>  #if HAVE_DLFCN_H
> @@ -20106,7 +20106,7 @@ else
>lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
>lt_status=$lt_dlunknown
>cat > conftest.$ac_ext <<_LT_EOF
> -#line 20101 "configure"
> +#line 20109 "configure"
>  #include "confdefs.h"
>  
>  #if HAVE_DLFCN_H
> 
>
> I'm not sure what that means, whether a wrong version of
> autoconf/automake was used (though when I accidentally tried that, it
> has always complained loudly) or if some environment difference can
> cause this.

This can happen if commits were rebased without re-generating configure
scripts.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH 2/4] maintainer-scripts/gcc_release: create index between snapshots <-> commits

2023-11-02 Thread Andreas Schwab
On Nov 02 2023, Jonathan Wakely wrote:

> Git tags are cheap, but I can imagine a concern about hundreds of new
> tags "littering" the output of 'git tag -l'. I don't _think_ you can
> put tags under an alternative ref that isn't fetched by default (as we
> do with refs/users and refs/vendor). I think tags have to go under
> refs/tags. But grep -v could be used to filter out snapshot tags
> easily.

There is no inherent limitation on publishing tags outside of refs/tags,
to make them invisible by git tag.  There are already existing examples
of tags residing under various refs/users and refs/vendors namespaces.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [Ready to commit V3] RISC-V: Add AVL propagation PASS for RVV auto-vectorization

2023-10-28 Thread Andreas Schwab
../../gcc/config/riscv/riscv-avlprop.cc: In member function 'virtual unsigned 
int pass_avlprop::execute(function*)':
../../gcc/config/riscv/riscv-avlprop.cc:346:23: error: loop variable 
'candidate' creates a copy from type 'const std::pair' [-Werror=range-loop-construct]
  346 |   for (const auto candidate : m_candidates)
  |   ^
../../gcc/config/riscv/riscv-avlprop.cc:346:23: note: use reference type to 
prevent copying
  346 |   for (const auto candidate : m_candidates)
  |   ^
  |   &

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [RFC] Add function attribute: null_terminated_string_arg(PARAM_IDX)

2023-10-19 Thread Andreas Schwab
On Okt 19 2023, David Malcolm wrote:

> +void
> +region_model::
> +check_one_function_attr_null_terminated_string_arg (const gcall *call,
> + tree callee_fndecl,
> + region_model_context *ctxt,
> + rdwr_map _idx,
> + tree attr)
> +{
> +  gcc_assert (call);
> +  gcc_assert (callee_fndecl);
> +  gcc_assert (ctxt);
> +  gcc_assert (attr);
> +
> +  tree arg = TREE_VALUE (attr);
> +  if (!arg)
> +return;
> +
> +  /* Convert from 1-based to 0-based index.  */
> +  unsigned int arg_idx = TREE_INT_CST_LOW (TREE_VALUE (arg)) - 1;
> +
> +  /* If there's also an "access" attribute on the ptr param
> + for reading with a size param specified, then that size
> + limits the size of the possible read from the pointer.  */
> +  if (const attr_access* access = rdwr_idx.get (arg_idx))
> +if ((access->mode == access_read_only
> +  || access->mode == access_read_write)
> + && access->sizarg != UINT_MAX)
> +  {
> + /* First, check for a null-terminated string *without*
> +emitting emitting warnings (via a null context), to

-emitting

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: Enable top-level recursive 'autoreconf'

2023-10-19 Thread Andreas Schwab
On Okt 19 2023, Thomas Schwinge wrote:

> Hi!
>
> On 2023-10-18T15:42:18+0100, R jd <3246251196r...@gmail.com> wrote:
>> I guess I can ask, why there is not a recursive approach for configuring
>> GCC. e.g. AC_SUBDIRS in the top level?
>
> ('AC_CONFIG_SUBDIRS' you mean.)  You know, often it just takes someone to
> ask the right questions...  ;-)
>
> What do people think about the attached
> "Enable top-level recursive 'autoreconf'"?  Only lightly tested, so far.

The top-level files are shared with binutils-gdb, which has a different
set of subdirs.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH V2] TEST: Fix vect_cond_arith_* dump checks for RVV

2023-10-09 Thread Andreas Schwab
On Okt 09 2023, juzhe.zh...@rivai.ai wrote:

> Turns out COND(_LEN)?_ADD can't work.

It should work though.  Tcl regexps are a superset of POSIX EREs.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] rtl: fix buidl failure on -fchecking=2 [PR111642]

2023-09-30 Thread Andreas Schwab
On Sep 30 2023, Sergei Trofimovich wrote:

> @@ -263,7 +253,7 @@ const_poly_int_tests::run ()
>ASSERT_KNOWN_EQ (rtx_to_poly_int64 (x255), poly_int64 (1, -1));
>ASSERT_MAYBE_NE (rtx_to_poly_int64 (x255), poly_int64 (1, 255));
>  
> -  /* Test plus_constant of a symbol.  */
> +  /* Test plus_consctant of a symbol.  */

Spurious change.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH v2] analyzer: Call off a superseding when diagnostics are unrelated [PR110830]

2023-09-11 Thread Andreas Schwab via Gcc-patches
../../gcc/analyzer/diagnostic-manager.cc: In function 'bool 
ana::compatible_epath_p(const exploded_path*, const exploded_path*)':
../../gcc/analyzer/diagnostic-manager.cc:969:1: warning: control reaches end of 
non-void function [-Wreturn-type]

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH 3/5] [RISC-V] Generate Zicond instruction for select pattern with condition eq or neq to 0

2023-07-25 Thread Andreas Schwab
On Jul 19 2023, Xiao Zeng wrote:

> diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
> index 38d8eb2fcf5..7e6b24bd232 100644
> --- a/gcc/config/riscv/riscv.cc
> +++ b/gcc/config/riscv/riscv.cc
> @@ -2448,6 +2448,17 @@ riscv_rtx_costs (rtx x, machine_mode mode, int 
> outer_code, int opno ATTRIBUTE_UN
> *total = COSTS_N_INSNS (1);
> return true;
>   }
> +  else if (TARGET_ZICOND && outer_code == SET &&
> +   ((GET_CODE (XEXP (x, 1)) == REG && XEXP (x, 2) == const0_rtx) 
> ||
> +   (GET_CODE (XEXP (x, 2)) == REG && XEXP (x, 1) == const0_rtx) 
> ||
> +   (GET_CODE (XEXP (x, 1)) == REG && GET_CODE (XEXP (x, 2)) &&
> +XEXP (x, 1) == XEXP (XEXP (x, 0), 0)) ||
> +   (GET_CODE (XEXP (x, 1)) == REG && GET_CODE (XEXP (x, 2)) &&
> +    XEXP (x, 2) == XEXP (XEXP (x, 0), 0

Line breaks before the operator, not after.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] Use substituted GDCFLAGS

2023-07-24 Thread Andreas Schwab via Gcc-patches
Ping?

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH 1/2] Fix PR 110066: crash with -pg -static on riscv

2023-07-23 Thread Andreas Schwab
On Jul 22 2023, Andrew Pinski via Gcc-patches wrote:

> The problem -fasynchronous-unwind-tables is on by default for riscv linux
> We need turn it off for crt*.o because it would make __EH_FRAME_BEGIN__ point
> to .eh_frame data from crtbeginT.o instead of the user-defined object
> during static linking.
>
> This turns it off.

Since this is a recurring problem, and difficult to notice (see how long
the aarch64 case went unnoticed), it should be fixed generically,
instead of having to patch every case separately.

> diff --git a/libgcc/config/riscv/t-crtstuff b/libgcc/config/riscv/t-crtstuff
> new file mode 100644
> index 000..685d11b3e66
> --- /dev/null
> +++ b/libgcc/config/riscv/t-crtstuff
> @@ -0,0 +1,5 @@
> +# -fasynchronous-unwind-tables -funwind-tables is on by default for riscv 
> linux
> +# We turn it off for crt*.o because it would make __EH_FRAME_BEGIN__ point
> +# to .eh_frame data from crtbeginT.o instead of the user-defined object
> +# during static linking.
> +CRTSTUFF_T_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables

What about CRTSTUFF_T_CFLAGS_S?

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH V3] RISC-V: Add TARGET_MIN_VLEN > 4096 check

2023-07-21 Thread Andreas Schwab
../../gcc/config/riscv/riscv.cc: In function 'void riscv_option_override()':
../../gcc/config/riscv/riscv.cc:6716:7: error: misspelled term 'can not' in 
format; use 'cannot' instead [-Werror=format-diag]
 6716 |   "Current RISC-V GCC can not support VLEN > 4096bit for 'V' 
Extension");
  |   
^   
../../gcc/config/riscv/riscv.cc:6716:7: error: unbalanced punctuation character 
'>' in format [-Werror=format-diag]

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


[PATCH] Use substituted GDCFLAGS

2023-07-17 Thread Andreas Schwab via Gcc-patches
Use the substituted value for GCDFLAGS instead of hardcoding $(CFLAGS) so
that the subdir configure scripts use the configured value.

* configure.ac (GDCFLAGS): Set default from ${CFLAGS}.
* configure: Regenerate.
* Makefile.in (GDCFLAGS): Substitute @GDCFLAGS@.
---
 Makefile.in  | 2 +-
 configure| 1 +
 configure.ac | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index 04307ca561b..144bccd2603 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -444,7 +444,7 @@ LIBCFLAGS = $(CFLAGS)
 CXXFLAGS = @CXXFLAGS@
 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
 GOCFLAGS = $(CFLAGS)
-GDCFLAGS = $(CFLAGS)
+GDCFLAGS = @GDCFLAGS@
 GM2FLAGS = $(CFLAGS)
 
 # Pass additional PGO and LTO compiler options to the PGO build.
diff --git a/configure b/configure
index 0d3f5c6455d..3269da9829f 100755
--- a/configure
+++ b/configure
@@ -12947,6 +12947,7 @@ fi
 
 
 
+GDCFLAGS=${GDCFLAGS-${CFLAGS}}
 
 # Target tools.
 
diff --git a/configure.ac b/configure.ac
index dddab2a56d8..d07a0fa7698 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3662,6 +3662,7 @@ AC_SUBST(CFLAGS)
 AC_SUBST(CXXFLAGS)
 AC_SUBST(GDC)
 AC_SUBST(GDCFLAGS)
+GDCFLAGS=${GDCFLAGS-${CFLAGS}}
 
 # Target tools.
 AC_ARG_WITH([build-time-tools], 
-- 
2.41.0


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [gcc r14-2455] riscv: Prepare backend for index registers

2023-07-17 Thread Andreas Schwab
On Jul 17 2023, Christoph Müllner wrote:

> My host compiler is: gcc version 13.1.1 20230614 (Red Hat 13.1.1-4) (GCC)

Too old.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [gcc r14-2455] riscv: Prepare backend for index registers

2023-07-17 Thread Andreas Schwab
On Jul 17 2023, Christoph Müllner wrote:

> The build process shows a lot of warnings.

Then you are using a bad compiler.  The build is 100% -Werror clean.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [gcc r14-2455] riscv: Prepare backend for index registers

2023-07-14 Thread Andreas Schwab
Why didn't you test that?

../../gcc/config/riscv/riscv.cc: In function 'int 
riscv_regno_ok_for_index_p(int)':
../../gcc/config/riscv/riscv.cc:864:33: error: unused parameter 'regno' 
[-Werror=unused-parameter]
  864 | riscv_regno_ok_for_index_p (int regno)
  | ^
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:2499: riscv.o] Error 1

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] Mark asm goto with outputs as volatile

2023-06-27 Thread Andreas Schwab via Gcc-patches
On Jun 26 2023, Andrew Pinski via Gcc-patches wrote:

> diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc
> index 0e24b915b8f..dc6a00e8bd9 100644
> --- a/gcc/gimplify.cc
> +++ b/gcc/gimplify.cc
> @@ -6935,7 +6935,12 @@ gimplify_asm_expr (tree *expr_p, gimple_seq *pre_p, 
> gimple_seq *post_p)
>stmt = gimple_build_asm_vec (TREE_STRING_POINTER (ASM_STRING (expr)),
>  inputs, outputs, clobbers, labels);
>  
> -  gimple_asm_set_volatile (stmt, ASM_VOLATILE_P (expr) || noutputs == 0);
> +  /* asm is volatile if it was marked by the user as volatile or
> +  there is no outputs or this is an asm goto.  */
   are

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH V1] RISC-V:Add float16 tuple type support

2023-06-25 Thread Andreas Schwab
Please revert until bootstrap is restored.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH V1] RISC-V:Add float16 tuple type support

2023-06-23 Thread Andreas Schwab
../../gcc/lto-streamer-out.cc: In function 'void lto_output_init_mode_table()':
../../gcc/lto-streamer-out.cc:3177:10: error: 'void* memset(void*, int, 
size_t)' forming offset [256, 283] is out of the bounds [0, 256] of object 
'streamer_mode_table' with type 'unsigned char [256]' [-Werror=array-bounds=]
 3177 |   memset (streamer_mode_table, '\0', MAX_MACHINE_MODE);
  |   ~~~^
In file included from ../../gcc/gimple-streamer.h:25,
 from ../../gcc/lto-streamer-out.cc:33:
../../gcc/tree-streamer.h:78:22: note: 'streamer_mode_table' declared here
   78 | extern unsigned char streamer_mode_table[1 << 8];
  |  ^~~
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:1180: lto-streamer-out.o] Error 1

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Andreas Schwab
On Jun 20 2023, Ian Lance Taylor wrote:

> OK, but I think that it does have something to do with big-endian.
> The bug was that on some 32-bit systems it was passing a 64-bit value
> to a function that expected a 32-bit value.  The problem didn't show
> up on 32-bit x86 because it is little-endian, and did show up on
> 32-bit PPC because it is big-endian.  I guess the armv7 case was
> failing for a different reason.

Not failing is no proof for correctness.  It fails everywhere for the
same reason.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Andreas Schwab
On Jun 20 2023, Ian Lance Taylor via Gcc-patches wrote:

> This libgo patches changes the runtime pacakge to use a C function to call 
> mmap.
>
> The final argument to mmap, of type off_t, varies. In
> https://go.dev/cl/445375
> (https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604158.html)
> we changed it to always use the C off_t type, but that broke 32-bit
> big-endian Linux systems.

This has nothing to do with big-endian, armv7 isn't big-endian.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [libstdc++] Improve M_check_len

2023-06-20 Thread Andreas Schwab via Gcc-patches
On Jun 20 2023, Jakub Jelinek via Gcc-patches wrote:

> Is it safe even on 64bit targets?  I mean, doesn't say PowerPC already allow
> full 64-bit virtual address space?  The assumption that one can't have
> more than half of virtual address space allocations is true right now at
> least on x86-64, aarch64 and others, but isn't that something that can
> change with newer versions of CPUs without the need to recompile
> applications (add another level or two of page tables)?

At least s390 can allocate more than half the address space.  That
triggered a failure in gawk.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH V2] RISC-V: Rework Phase 5 && Phase 6 of VSETVL PASS

2023-06-16 Thread Andreas Schwab
Why didn't you test that??

../../gcc/config/riscv/riscv-vsetvl.cc: In member function 'bool 
pass_vsetvl::global_eliminate_vsetvl_insn(const rtl_ssa::bb_info*) const':
../../gcc/config/riscv/riscv-vsetvl.cc:4354:3: error: 'vsetvl_rinsn' may be 
used uninitialized [-Werror=maybe-uninitialized]
 4354 |   if (!vsetvl_rinsn)
  |   ^~
../../gcc/config/riscv/riscv-vsetvl.cc:4343:13: note: 'vsetvl_rinsn' was 
declared here
 4343 |   rtx_insn *vsetvl_rinsn;
  | ^~~~
cc1plus: all warnings being treated as errors
make[3]: *** [../../gcc/config/riscv/t-riscv:66: riscv-vsetvl.o] Error 1

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-08 Thread Andreas Schwab
On Jun 08 2023, Tamar Christina via Gcc-patches wrote:

> @@ -713,6 +714,183 @@ you can use @samp{*} inside of a @samp{@@} 
> multi-alternative template:
>  @end group
>  @end smallexample
>  
> +@node Compact Syntax
> +@section Compact Syntax
> +@cindex compact syntax
> +
> +In cases where the number of alternatives in a @code{define_insn} or
> +@code{define_insn_and_split} are large then it may be beneficial to use the

        is large

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] libstdc++: Use AS_IF in configure.ac

2023-06-07 Thread Andreas Schwab via Gcc-patches
On Jun 07 2023, Jonathan Wakely via Gcc-patches wrote:

> Let's just revert it then. The manual says we should use AS_IF, but what we
> had previously was working well enough. I'll figure out what happened here
> later.

I think AS_IF is doing its job here: moving the expansion of
AC_REQUIRE'd macros out of the bodies.  But many of those expansions
actually need to remain under the $GLIBCXX_IS_NATIVE conditional, so it
is not appropriate at this place.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] RISC-V: Fix warning in predicated.md

2023-06-02 Thread Andreas Schwab
../../gcc/gcc/config/riscv/predicates.md: In function ‘bool arith_operand_or_mod
e_mask(rtx, machine_mode)’:
../../gcc/gcc/config/riscv/predicates.md:33:14: warning: comparison between 
signed and unsigned integer expressions [-Wsign-compare]
 (match_test "INTVAL (op) == GET_MODE_MASK (HImode)

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] riscv: update riscv_asan_shadow_offset

2023-05-30 Thread Andreas Schwab via Gcc-patches
Ok for 12 and 13 branch?

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


[PATCH] riscv: add work around for PR sanitizer/82501

2023-05-30 Thread Andreas Schwab via Gcc-patches
PR sanitizer/82501
* c-c++-common/asan/pointer-compare-1.c: Disable use of small data
on RISC-V.
---
 gcc/testsuite/c-c++-common/asan/pointer-compare-1.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/testsuite/c-c++-common/asan/pointer-compare-1.c 
b/gcc/testsuite/c-c++-common/asan/pointer-compare-1.c
index 4b558bf8179..fb9126d6df1 100644
--- a/gcc/testsuite/c-c++-common/asan/pointer-compare-1.c
+++ b/gcc/testsuite/c-c++-common/asan/pointer-compare-1.c
@@ -5,6 +5,7 @@
 /* FIXME: remove me after PR sanitizer/82501 is resolved.  */
 /* { dg-additional-options "-fno-section-anchors" } */
 /* { dg-additional-options "-msdata=none" { target { powerpc*-*-* } } } */
+/* { dg-additional-options "-msmall-data-limit=0" { target { riscv*-*-* } } } 
*/
 
 volatile int v;
 
-- 
2.40.1


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


[PATCH] riscv: update riscv_asan_shadow_offset

2023-05-30 Thread Andreas Schwab via Gcc-patches
This fixes all asan tests, apart from
c-c++-common/asan/pointer-compare-1.c which needs a workaround for PR
sanitizer/82501.

PR target/110036
* config/riscv/riscv.cc (riscv_asan_shadow_offset): Update to
match libsanitizer.
---
 gcc/config/riscv/riscv.cc | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 09fc9e5d95e..b358ca8b5d0 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -7043,10 +7043,9 @@ riscv_asan_shadow_offset (void)
 {
   /* We only have libsanitizer support for RV64 at present.
 
- This number must match kRiscv*_ShadowOffset* in the file
- libsanitizer/asan/asan_mapping.h which is currently 1<<29 for rv64,
- even though 1<<36 makes more sense.  */
-  return TARGET_64BIT ? (HOST_WIDE_INT_1 << 29) : 0;
+ This number must match ASAN_SHADOW_OFFSET_CONST in the file
+ libsanitizer/asan/asan_mapping.h.  */
+  return TARGET_64BIT ? HOST_WIDE_INT_UC (0xd) : 0;
 }
 
 /* Implement TARGET_MANGLE_TYPE.  */
-- 
2.40.1


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] RISC-V: Add mode switching target hook to insert rounding mode config for fixed-point instructions

2023-05-19 Thread Andreas Schwab
This is built with --disable-werror, so it doesn't fail, but the warning
is there:

https://build.opensuse.org/package/live_build_log/devel:gcc:next/gcc14/openSUSE_Factory_RISCV/riscv64

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] RISC-V: Add mode switching target hook to insert rounding mode config for fixed-point instructions

2023-05-19 Thread Andreas Schwab
In function 'int optimize_mode_switching()',
inlined from 'virtual unsigned int 
{anonymous}::pass_mode_switching::execute(function*)' at 
../../gcc/mode-switching.cc:909:31:
../../gcc/mode-switching.cc:608:29: error: 'bb_info$' may be used uninitialized 
[-Werror=maybe-uninitialized]
  608 | add_seginfo (info + bb->index, ptr);
  | ^~~
../../gcc/mode-switching.cc: In member function 'virtual unsigned int 
{anonymous}::pass_mode_switching::execute(function*)':
../../gcc/mode-switching.cc:503:19: note: 'bb_info$' was declared here
  503 |   struct bb_info *bb_info[N_ENTITIES];
  |   ^~~
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:1174: mode-switching.o] Error 1

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: RISC-V Test Errors and Failures

2023-05-17 Thread Andreas Schwab via Gcc-patches
On Mai 16 2023, Vineet Gupta wrote:

> Yes I was seeing similar tcl errors and such - and in my case an even
> higher count.

They are coming from commit d6654a4be3b.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] riscv: Add autovectorization tests for binary integer

2023-05-15 Thread Andreas Schwab via Gcc-patches
In file included from /usr/include/features.h:515,
 from /usr/include/bits/libc-header-start.h:33,
 from /usr/include/stdint.h:26,
 from 
/daten/riscv64/gcc/gcc-20230512/Build/gcc/include/stdint.h:9,
 from 
/daten/riscv64/gcc/gcc-20230512/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/shift-template.h:1,
 from 
/daten/riscv64/gcc/gcc-20230512/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/shift-rv32gcv.c:4:
/usr/include/gnu/stubs.h:11:11: fatal error: gnu/stubs-ilp32d.h: No such file 
or directory
compilation terminated.
compiler exited with status 1
FAIL: gcc.target/riscv/rvv/autovec/binop/shift-rv32gcv.c (test for excess 
errors)
Excess errors:
/usr/include/gnu/stubs.h:11:11: fatal error: gnu/stubs-ilp32d.h: No such file 
or directory
compilation terminated.


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH v2] RISC-V: Handle multi-lib path correclty for linux

2023-05-12 Thread Andreas Schwab
WTF?

../../gcc/common/config/riscv/riscv-common.cc: In function 'const char* 
riscv_select_multilib_by_abi(const std::string&, const std::string&, const 
riscv_subset_list*, const switchstr*, int, const 
std::vector&)':
../../gcc/common/config/riscv/riscv-common.cc:1599:22: error: unused parameter 
'riscv_current_arch_str' [-Werror=unused-parameter]
 1599 |   const std::string _current_arch_str,
  |   ~~~^~
../../gcc/common/config/riscv/riscv-common.cc:1601:28: error: unused parameter 
'subset_list' [-Werror=unused-parameter]
 1601 |   const riscv_subset_list *subset_list, const struct switchstr 
*switches,
  |   ~^~~
../../gcc/common/config/riscv/riscv-common.cc:1601:65: error: unused parameter 
'switches' [-Werror=unused-parameter]
 1601 |   const riscv_subset_list *subset_list, const struct switchstr 
*switches,
  | ^~~~
../../gcc/common/config/riscv/riscv-common.cc:1602:7: error: unused parameter 
'n_switches' [-Werror=unused-parameter]
 1602 |   int n_switches, const std::vector 
_infos)
  |   ^~
../../gcc/common/config/riscv/riscv-common.cc: In function 'const char* 
riscv_select_multilib(const std::string&, const std::string&, const 
riscv_subset_list*, const switchstr*, int, const 
std::vector&)':
../../gcc/common/config/riscv/riscv-common.cc:1613:22: error: unused parameter 
'riscv_current_arch_str' [-Werror=unused-parameter]
 1613 |   const std::string _current_arch_str,
  |   ~~~^~
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:2485: riscv-common.o] Error 1

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] libffi: fix handling of homogeneous float128 structs [PR109447]

2023-05-10 Thread Andreas Schwab
On Mai 09 2023, Peter Bergner via Gcc-patches wrote:

> On 5/9/23 3:50 PM, Andreas Schwab wrote:
>> On Mai 09 2023, Peter Bergner via Gcc-patches wrote:
>> 
>>> It's almost as if the top level build machinery
>>> adds a LD_LIBRARY_PATH=...
>> 
>> See how the toplevel Makefile sets LD_LIBRARY_PATH (via RPATH_ENVVAR) if
>> gcc-bootstrap is set.
>
> I'm sorry to be dense, but can you point to the specific line?  In my
> $GCC_BUILD/Makefile, the only mention of LD_LIBRARY_PATH is:
>
>   RPATH_ENVVAR = LD_LIBRARY_PATH
>
> ...so that isn't setting LD_LIBRARY_PATH, but using it.

Have you considered searching for uses of RPATH_ENVVAR?

$ grep RPATH_ENVVAR Makefile.in 
RPATH_ENVVAR = @RPATH_ENVVAR@
# On targets where RPATH_ENVVAR is PATH, a subdirectory of the GCC build path
$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
# This is the list of directories that may be needed in RPATH_ENVVAR
# This is the list of directories that may be needed in RPATH_ENVVAR
"RPATH_ENVVAR=$(RPATH_ENVVAR)" \

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] libffi: fix handling of homogeneous float128 structs [PR109447]

2023-05-09 Thread Andreas Schwab
On Mai 09 2023, Peter Bergner via Gcc-patches wrote:

> It's almost as if the top level build machinery
> adds a LD_LIBRARY_PATH=...

See how the toplevel Makefile sets LD_LIBRARY_PATH (via RPATH_ENVVAR) if
gcc-bootstrap is set.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH v5 09/11] RISC-V: Weaken mem_thread_fence

2023-05-03 Thread Andreas Schwab via Gcc-patches
../../gcc/config/riscv/sync.md: In function 'const char* output_479(rtx_def**, 
rtx_insn*)':
../../gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void 
function [-Werror=return-type]
   66 |   [(set (attr "length") (const_int 4))])
  | ^

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


[PATCH] riscv: Don't add -latomic with -pthread

2023-05-03 Thread Andreas Schwab via Gcc-patches
Now that we have support for inline subword atomic operations, it is no
longer necessary to link against libatomic.  This also fixes testsuite
failures because the framework does not properly set up the linker flags
for finding libatomic.
The use of atomic operations is also independent of the use of libpthread.
---
 gcc/config/riscv/linux.h | 10 --
 1 file changed, 10 deletions(-)

diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
index b9557a75dc7..2fdfd930cf2 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -35,16 +35,6 @@ along with GCC; see the file COPYING3.  If not see
 #undef MUSL_DYNAMIC_LINKER
 #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX 
".so.1"
 
-/* Because RISC-V only has word-sized atomics, it requries libatomic where
-   others do not.  So link libatomic by default, as needed.  */
-#undef LIB_SPEC
-#ifdef LD_AS_NEEDED_OPTION
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC \
-  " %{pthread:" LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION "}"
-#else
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC " -latomic "
-#endif
-
 #define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
 
 #define CPP_SPEC "%{pthread:-D_REENTRANT}"
-- 
2.40.1


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] RISC-V: Fix sync.md and riscv.cc whitespace errors

2023-04-26 Thread Andreas Schwab
On Apr 26 2023, Patrick O'Neill wrote:

> @@ -290,10 +290,10 @@
>[(set (match_operand:GPR 0 "register_operand" "=")
>   (match_operand:GPR 1 "memory_operand" "+A"))
> (set (match_dup 1)
> - (unspec_volatile:GPR [(match_operand:GPR 2 "reg_or_0_operand" "rJ")
> -   (match_operand:GPR 3 "reg_or_0_operand" "rJ")
> -   (match_operand:SI 4 "const_int_operand")  ;; mod_s
> -   (match_operand:SI 5 "const_int_operand")] ;; mod_f
> + (unspec_volatile:GPR[(match_operand:GPR 2 "reg_or_0_operand" "rJ")
> +  (match_operand:GPR 3 "reg_or_0_operand" "rJ")
> +  (match_operand:SI 4 "const_int_operand")  ;; mod_s
> +  (match_operand:SI 5 "const_int_operand")] ;; mod_f

That appears to be a bug in the checker.  This isn't a C array
expression, but an argument in lispy vector notation, so it should be
separated by a space.

> @@ -431,15 +431,15 @@
>  })
>
>  (define_insn "subword_atomic_cas_strong"
> -  [(set (match_operand:SI 0 "register_operand" "=")
>;; old value at mem
> - (match_operand:SI 1 "memory_operand" "+A"));; 
> mem location
> +  [(set (match_operand:SI 0 "register_operand" "=")
>   ;; old value at mem
> + (match_operand:SI 1 "memory_operand" "+A"))   ;; 
> mem location
> (set (match_dup 1)
> - (unspec_volatile:SI [(match_operand:SI 2 "reg_or_0_operand" "rJ")  ;; 
> expected value
> -  (match_operand:SI 3 "reg_or_0_operand" "rJ")] ;; 
> desired value
> + (unspec_volatile:SI[(match_operand:SI 2 "reg_or_0_operand" "rJ")  ;; 
> expected value
> + (match_operand:SI 3 "reg_or_0_operand" "rJ")] ;; 
> desired value

Likewise.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] Turn on LRA on all targets

2023-04-24 Thread Andreas Schwab
Here is the result for m68k:

libtool: compile:  /daten/aranym/gcc/gcc-20230424/Build/./gcc/xgcc 
-shared-libgcc -B/daten/aranym/gcc/gcc-20230424/Build/./gcc -nostdinc++ 
-L/daten/aranym/gcc/gcc-20230424/Build/m68k-linux/libstdc++-v3/src 
-L/daten/aranym/gcc/gcc-20230424/Build/m68k-linux/libstdc++-v3/src/.libs 
-L/daten/aranym/gcc/gcc-20230424/Build/m68k-linux/libstdc++-v3/libsupc++/.libs 
-B/daten/cross/m68k-linux/m68k-linux/bin/ 
-B/daten/cross/m68k-linux/m68k-linux/lib/ -isystem 
/daten/cross/m68k-linux/m68k-linux/include -isystem 
/daten/cross/m68k-linux/m68k-linux/sys-include 
-I/daten/aranym/gcc/gcc-20230424/libstdc++-v3/../libgcc 
-I/daten/aranym/gcc/gcc-20230424/Build/m68k-linux/libstdc++-v3/include/m68k-linux
 -I/daten/aranym/gcc/gcc-20230424/Build/m68k-linux/libstdc++-v3/include 
-I/daten/aranym/gcc/gcc-20230424/libstdc++-v3/libsupc++ -std=gnu++11 
-D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings 
-Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections 
-fdata-sections -frandom-seed=wlocale-inst.lo -g -O2 -D_GNU_SOURCE -c 
../../../../../libstdc++-v3/src/c++11/wlocale-inst.cc  -fPIC -DPIC 
-D_GLIBCXX_SHARED -o wlocale-inst.o
during RTL pass: reload
In file included from 
/daten/aranym/gcc/gcc-20230424/Build/m68k-linux/libstdc++-v3/include/bits/locale_facets.h:2687,
 from 
/daten/aranym/gcc/gcc-20230424/Build/m68k-linux/libstdc++-v3/include/locale:42,
 from ../../../../../libstdc++-v3/src/c++11/locale-inst.cc:38,
 from ../../../../../libstdc++-v3/src/c++11/wlocale-inst.cc:35:
/daten/aranym/gcc/gcc-20230424/Build/m68k-linux/libstdc++-v3/include/bits/locale_facets.tcc:
 In member function '_InIter std::num_get<_CharT, _InIter>::do_get(iter_type, 
iter_type, std::ios_base&, std::ios_base::iostate&, bool&) const [with _CharT = 
wchar_t; _InIter = std::istreambuf_iterator 
>]':
/daten/aranym/gcc/gcc-20230424/Build/m68k-linux/libstdc++-v3/include/bits/locale_facets.tcc:686:5:
 internal compiler error: maximum number of generated reload insns per insn 
achieved (90)
  686 | }
  | ^
0xe8a5e8 lra_constraints(bool)
../../gcc/lra-constraints.cc:5319
0xe71f32 lra(_IO_FILE*)
../../gcc/lra.cc:2375
0xe21731 do_reload
../../gcc/ira.cc:5967
0xe21731 execute
../../gcc/ira.cc:6153

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [RFA] [PR target/108248] [RISC-V] Break down some bitmanip insn types

2023-04-21 Thread Andreas Schwab
../../gcc/config/riscv/generic.md:28:1: unknown value `smin' for attribute 
`type'
make[3]: *** [Makefile:2528: s-attrtab] Error 1

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH v5] RISCV: Inline subword atomic ops

2023-04-18 Thread Andreas Schwab
On Apr 18 2023, Patrick O'Neill wrote:

> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index a38547f53e5..9c3e91d2fee 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -1227,6 +1227,7 @@ See RS/6000 and PowerPC Options.
>  -mstack-protector-guard=@var{guard}  -mstack-protector-guard-reg=@var{reg}
>  -mstack-protector-guard-offset=@var{offset}
>  -mcsr-check -mno-csr-check}
> +-minline-atomics  -mno-inline-atomics

The options need to be inside @gccoptlist.

> @@ -29006,6 +29007,13 @@ Do or don't use smaller but slower prologue and 
> epilogue code that uses
>  library function calls.  The default is to use fast inline prologues and
>  epilogues.
>  
> +@item -minline-atomics
> +@itemx -mno-inline-atomics
> +@opindex minline-atomics

@opindex should precede @item.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH v3] RISC-V: Add Z*inx imcompatible check in gcc

2023-03-31 Thread Andreas Schwab
../../gcc/common/config/riscv/riscv-common.cc: In static member function 
'static riscv_subset_list* riscv_subset_list::parse(const char*, location_t)':
../../gcc/common/config/riscv/riscv-common.cc:1158:48: error: unquoted keyword 
'float' in format [-Werror=format-diag]
 1158 | "%<-march=%s%>: z*inx is conflict with float extensions",
  |    ^~~~~

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] configure: deprecate --enable-link-mutex option

2023-03-29 Thread Andreas Schwab via Gcc-patches
On Mär 29 2023, Martin Liška wrote:

> diff --git a/gcc/configure.ac b/gcc/configure.ac
> index 120151c474a..13c1a85851c 100644
> --- a/gcc/configure.ac
> +++ b/gcc/configure.ac
> @@ -7013,6 +7013,7 @@ AC_MSG_RESULT($do_link_mutex)
>  
>  if test "$do_link_mutex" = "yes"; then
> DO_LINK_MUTEX=true
> +   echo gcc/configure: WARNING: --enable-link-mutex is deprecated and will 
> be removed in the next release, use --enable-link-serialization instead 1>&2

Please use AC_MSG_WARN.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


m68k: handle TLS access with offset

2023-03-26 Thread Andreas Schwab
/gcc/testsuite/gcc.target/m68k/tls-le-xtls-off.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! *-linux-* } } */
+/* { dg-options "-O2 -mxtls" } */
+/* { dg-final { scan-assembler "jsr __m68k_read_tp" } } */
+/* { dg-final { scan-assembler "#foo\\+4@TLSLE,\%\[ad\]\[0-7\]" } } */
+
+static int __thread foo[2];
+
+int *
+bar (void)
+{
+  return foo + 1;
+}
diff --git a/gcc/testsuite/gcc.target/m68k/tls-le.c 
b/gcc/testsuite/gcc.target/m68k/tls-le.c
index 74234e9e5a4..7a9f215f44b 100644
--- a/gcc/testsuite/gcc.target/m68k/tls-le.c
+++ b/gcc/testsuite/gcc.target/m68k/tls-le.c
@@ -2,7 +2,7 @@
 /* { dg-skip-if "" { ! *-linux-* } } */
 /* { dg-options "-O2" } */
 /* { dg-final { scan-assembler "jsr __m68k_read_tp" } } */
-/* { dg-final { scan-assembler "lea \\(foo@TLSLE,\%a0\\)" } } */
+/* { dg-final { scan-assembler "foo@TLSLE,%a0" } } */
 
 static int __thread foo;
 
-- 
2.40.0


-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [patch, fortran, doc] Explicitly mention undefined overflow

2023-03-19 Thread Andreas Schwab
On Mär 19 2023, Thomas Koenig via Gcc-patches wrote:

> diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
> index c483e13686d..93c66b18938 100644
> --- a/gcc/fortran/gfortran.texi
> +++ b/gcc/fortran/gfortran.texi
> @@ -820,6 +820,7 @@ might in some way or another become visible to the 
> programmer.
>  * File operations on symbolic links::
>  * File format of unformatted sequential files::
>  * Asynchronous I/O::
> +* Behavior on integer overflow::o

s/o$//

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [ada] fix unknown type name 'cpu_set_t'

2023-02-27 Thread Andreas Schwab via Gcc-patches
On Feb 27 2023, 宋冬生 via Gcc-patches wrote:

> diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
> index 987432c93..fa8ddaf13 100644
> --- a/gcc/ada/adaint.h
> +++ b/gcc/ada/adaint.h
> @@ -319,6 +319,9 @@ extern void   *__gnat_lwp_self   
> (void);
>  
>  /* Routines for interface to required CPU set primitives */
>  
> +#ifndef _GNU_SOURCE
> +#define _GNU_SOURCE
> +#endif
>  #include 
>  
>  extern cpu_set_t *__gnat_cpu_alloc (size_t);

Feature test macros must always be defined before any system header is
included.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


[PATCH] libstdc++: Update baseline symbols for riscv64-linux

2023-02-20 Thread Andreas Schwab via Gcc-patches
:_ZSt15__try_use_facetISt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt8time_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwPKT_RKSt6locale@@GLIBCXX_3.4.31
 FUNC:_ZSt15future_categoryv@@GLIBCXX_3.4.15
 FUNC:_ZSt15get_new_handlerv@@GLIBCXX_3.4.20
 FUNC:_ZSt15set_new_handlerPFvvE@@GLIBCXX_3.4
@@ -4150,12 +4220,17 @@ FUNC:_ZSt20__throw_future_errori@@GLIBCXX_3.4.14
 FUNC:_ZSt20__throw_length_errorPKc@@GLIBCXX_3.4
 FUNC:_ZSt20__throw_out_of_rangePKc@@GLIBCXX_3.4
 FUNC:_ZSt20__throw_system_errori@@GLIBCXX_3.4.11
+FUNC:_ZSt20__to_chars_float16_tPcS_fSt12chars_format@@GLIBCXX_3.4.31
 FUNC:_ZSt21_Rb_tree_rotate_rightPSt18_Rb_tree_node_baseRS0_@@GLIBCXX_3.4
 
FUNC:_ZSt21__copy_streambufs_eofIcSt11char_traitsIcEElPSt15basic_streambufIT_T0_ES6_Rb@@GLIBCXX_3.4.9
 
FUNC:_ZSt21__copy_streambufs_eofIwSt11char_traitsIwEElPSt15basic_streambufIT_T0_ES6_Rb@@GLIBCXX_3.4.9
+FUNC:_ZSt21__glibcxx_assert_failPKciS0_S0_@@GLIBCXX_3.4.30
 FUNC:_ZSt21__throw_bad_exceptionv@@GLIBCXX_3.4
 FUNC:_ZSt21__throw_runtime_errorPKc@@GLIBCXX_3.4
+FUNC:_ZSt21__to_chars_bfloat16_tPcS_fSt12chars_format@@GLIBCXX_3.4.31
+FUNC:_ZSt22__from_chars_float16_tPKcS0_RfSt12chars_format@@GLIBCXX_3.4.31
 FUNC:_ZSt22__throw_overflow_errorPKc@@GLIBCXX_3.4
+FUNC:_ZSt23__from_chars_bfloat16_tPKcS0_RfSt12chars_format@@GLIBCXX_3.4.31
 FUNC:_ZSt23__throw_underflow_errorPKc@@GLIBCXX_3.4
 FUNC:_ZSt24__throw_invalid_argumentPKc@@GLIBCXX_3.4
 FUNC:_ZSt24__throw_out_of_range_fmtPKcz@@GLIBCXX_3.4.20
@@ -4489,6 +4564,7 @@ OBJECT:0:CXXABI_1.3.10
 OBJECT:0:CXXABI_1.3.11
 OBJECT:0:CXXABI_1.3.12
 OBJECT:0:CXXABI_1.3.13
+OBJECT:0:CXXABI_1.3.14
 OBJECT:0:CXXABI_1.3.2
 OBJECT:0:CXXABI_1.3.3
 OBJECT:0:CXXABI_1.3.4
@@ -4522,6 +4598,8 @@ OBJECT:0:GLIBCXX_3.4.27
 OBJECT:0:GLIBCXX_3.4.28
 OBJECT:0:GLIBCXX_3.4.29
 OBJECT:0:GLIBCXX_3.4.3
+OBJECT:0:GLIBCXX_3.4.30
+OBJECT:0:GLIBCXX_3.4.31
 OBJECT:0:GLIBCXX_3.4.4
 OBJECT:0:GLIBCXX_3.4.5
 OBJECT:0:GLIBCXX_3.4.6
@@ -4593,6 +4671,12 @@ OBJECT:15:_ZTSSt8messagesIcE@@GLIBCXX_3.4
 OBJECT:15:_ZTSSt8messagesIwE@@GLIBCXX_3.4
 OBJECT:15:_ZTSSt8numpunctIcE@@GLIBCXX_3.4
 OBJECT:15:_ZTSSt8numpunctIwE@@GLIBCXX_3.4
+OBJECT:16:_ZTIDF128_@@CXXABI_1.3.14
+OBJECT:16:_ZTIDF16_@@CXXABI_1.3.14
+OBJECT:16:_ZTIDF32_@@CXXABI_1.3.14
+OBJECT:16:_ZTIDF32x@@CXXABI_1.3.14
+OBJECT:16:_ZTIDF64_@@CXXABI_1.3.14
+OBJECT:16:_ZTIDF64x@@CXXABI_1.3.14
 OBJECT:16:_ZTIDd@@CXXABI_1.3.4
 OBJECT:16:_ZTIDe@@CXXABI_1.3.4
 OBJECT:16:_ZTIDf@@CXXABI_1.3.4
@@ -5229,6 +5313,12 @@ 
OBJECT:30:_ZTSSt7codecvtIDiDu11__mbstate_tE@@GLIBCXX_3.4.26
 OBJECT:30:_ZTSSt7codecvtIDsDu11__mbstate_tE@@GLIBCXX_3.4.26
 
OBJECT:32:_ZNSbIwSt11char_traitsIwESaIwEE4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4
 OBJECT:32:_ZNSs4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4
+OBJECT:32:_ZTIPDF128_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPDF16_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPDF32_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPDF32x@@CXXABI_1.3.14
+OBJECT:32:_ZTIPDF64_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPDF64x@@CXXABI_1.3.14
 OBJECT:32:_ZTIPDd@@CXXABI_1.3.4
 OBJECT:32:_ZTIPDe@@CXXABI_1.3.4
 OBJECT:32:_ZTIPDf@@CXXABI_1.3.4
@@ -5236,6 +5326,12 @@ OBJECT:32:_ZTIPDi@@CXXABI_1.3.3
 OBJECT:32:_ZTIPDn@@CXXABI_1.3.5
 OBJECT:32:_ZTIPDs@@CXXABI_1.3.3
 OBJECT:32:_ZTIPDu@@CXXABI_1.3.12
+OBJECT:32:_ZTIPKDF128_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPKDF16_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPKDF32_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPKDF32x@@CXXABI_1.3.14
+OBJECT:32:_ZTIPKDF64_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPKDF64x@@CXXABI_1.3.14
 OBJECT:32:_ZTIPKDd@@CXXABI_1.3.4
 OBJECT:32:_ZTIPKDe@@CXXABI_1.3.4
 OBJECT:32:_ZTIPKDf@@CXXABI_1.3.4
-- 
2.39.1


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


[PATCH] Update baseline symbols for m68k-linux

2023-02-18 Thread Andreas Schwab
:_ZSt15__try_use_facetISt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt8messagesIcEEPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt8messagesIwEEPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt8numpunctIcEEPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt8numpunctIwEEPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt8time_getIwSt19istreambuf_iteratorIwSt11char_traitsIwPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt8time_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcPKT_RKSt6locale@@GLIBCXX_3.4.31
+FUNC:_ZSt15__try_use_facetISt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwPKT_RKSt6locale@@GLIBCXX_3.4.31
 FUNC:_ZSt15future_categoryv@@GLIBCXX_3.4.15
 FUNC:_ZSt15get_new_handlerv@@GLIBCXX_3.4.20
 FUNC:_ZSt15set_new_handlerPFvvE@@GLIBCXX_3.4
@@ -4150,12 +4224,17 @@ FUNC:_ZSt20__throw_future_errori@@GLIBCXX_3.4.14
 FUNC:_ZSt20__throw_length_errorPKc@@GLIBCXX_3.4
 FUNC:_ZSt20__throw_out_of_rangePKc@@GLIBCXX_3.4
 FUNC:_ZSt20__throw_system_errori@@GLIBCXX_3.4.11
+FUNC:_ZSt20__to_chars_float16_tPcS_fSt12chars_format@@GLIBCXX_3.4.31
 FUNC:_ZSt21_Rb_tree_rotate_rightPSt18_Rb_tree_node_baseRS0_@@GLIBCXX_3.4
 
FUNC:_ZSt21__copy_streambufs_eofIcSt11char_traitsIcEEiPSt15basic_streambufIT_T0_ES6_Rb@@GLIBCXX_3.4.9
 
FUNC:_ZSt21__copy_streambufs_eofIwSt11char_traitsIwEEiPSt15basic_streambufIT_T0_ES6_Rb@@GLIBCXX_3.4.9
+FUNC:_ZSt21__glibcxx_assert_failPKciS0_S0_@@GLIBCXX_3.4.30
 FUNC:_ZSt21__throw_bad_exceptionv@@GLIBCXX_3.4
 FUNC:_ZSt21__throw_runtime_errorPKc@@GLIBCXX_3.4
+FUNC:_ZSt21__to_chars_bfloat16_tPcS_fSt12chars_format@@GLIBCXX_3.4.31
+FUNC:_ZSt22__from_chars_float16_tPKcS0_RfSt12chars_format@@GLIBCXX_3.4.31
 FUNC:_ZSt22__throw_overflow_errorPKc@@GLIBCXX_3.4
+FUNC:_ZSt23__from_chars_bfloat16_tPKcS0_RfSt12chars_format@@GLIBCXX_3.4.31
 FUNC:_ZSt23__throw_underflow_errorPKc@@GLIBCXX_3.4
 FUNC:_ZSt24__throw_invalid_argumentPKc@@GLIBCXX_3.4
 FUNC:_ZSt24__throw_out_of_range_fmtPKcz@@GLIBCXX_3.4.20
@@ -4489,6 +4568,7 @@ OBJECT:0:CXXABI_1.3.10
 OBJECT:0:CXXABI_1.3.11
 OBJECT:0:CXXABI_1.3.12
 OBJECT:0:CXXABI_1.3.13
+OBJECT:0:CXXABI_1.3.14
 OBJECT:0:CXXABI_1.3.2
 OBJECT:0:CXXABI_1.3.3
 OBJECT:0:CXXABI_1.3.4
@@ -4522,6 +4602,8 @@ OBJECT:0:GLIBCXX_3.4.27
 OBJECT:0:GLIBCXX_3.4.28
 OBJECT:0:GLIBCXX_3.4.29
 OBJECT:0:GLIBCXX_3.4.3
+OBJECT:0:GLIBCXX_3.4.30
+OBJECT:0:GLIBCXX_3.4.31
 OBJECT:0:GLIBCXX_3.4.4
 OBJECT:0:GLIBCXX_3.4.5
 OBJECT:0:GLIBCXX_3.4.6
@@ -4704,6 +4786,9 @@ OBJECT:15:_ZTSSt8numpunctIcE@@GLIBCXX_3.4
 OBJECT:15:_ZTSSt8numpunctIwE@@GLIBCXX_3.4
 
OBJECT:16:_ZNSbIwSt11char_traitsIwESaIwEE4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4
 OBJECT:16:_ZNSs4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4
+OBJECT:16:_ZTIPDF32_@@CXXABI_1.3.14
+OBJECT:16:_ZTIPDF32x@@CXXABI_1.3.14
+OBJECT:16:_ZTIPDF64_@@CXXABI_1.3.14
 OBJECT:16:_ZTIPDd@@CXXABI_1.3.4
 OBJECT:16:_ZTIPDe@@CXXABI_1.3.4
 OBJECT:16:_ZTIPDf@@CXXABI_1.3.4
@@ -4711,6 +4796,9 @@ OBJECT:16:_ZTIPDi@@CXXABI_1.3.3
 OBJECT:16:_ZTIPDn@@CXXABI_1.3.5
 OBJECT:16:_ZTIPDs@@CXXABI_1.3.3
 OBJECT:16:_ZTIPDu@@CXXABI_1.3.12
+OBJECT:16:_ZTIPKDF32_@@CXXABI_1.3.14
+OBJECT:16:_ZTIPKDF32x@@CXXABI_1.3.14
+OBJECT:16:_ZTIPKDF64_@@CXXABI_1.3.14
 OBJECT:16:_ZTIPKDd@@CXXABI_1.3.4
 OBJECT:16:_ZTIPKDe@@CXXABI_1.3.4
 OBJECT:16:_ZTIPKDf@@CXXABI_1.3.4
@@ -5854,6 +5942,9 @@ 
OBJECT:8:_ZGVNSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE@@G
 
OBJECT:8:_ZGVNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE@@GLIBCXX_3.4
 
OBJECT:8:_ZGVNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE@@GLIBCXX_3.4
 
OBJECT:8:_ZGVNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE@@GLIBCXX_3.4
+OBJECT:8:_ZTIDF32_@@CXXABI_1.3.14
+OBJECT:8:_ZTIDF32x@@CXXABI_1.3.14
+OBJECT:8:_ZTIDF64_@@CXXABI_1.3.14
 OBJECT:8:_ZTIDd@@CXXABI_1.3.4
 OBJECT:8:_ZTIDe@@CXXABI_1.3.4
 OBJECT:8:_ZTIDf@@CXXABI_1.3.4
-- 
2.39.1


-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


[PATCH] Update baseline symbols for aarch64-linux

2023-02-15 Thread Andreas Schwab via Gcc-patches
:_ZSt20__throw_length_errorPKc@@GLIBCXX_3.4
 FUNC:_ZSt20__throw_out_of_rangePKc@@GLIBCXX_3.4
 FUNC:_ZSt20__throw_system_errori@@GLIBCXX_3.4.11
+FUNC:_ZSt20__to_chars_float16_tPcS_fSt12chars_format@@GLIBCXX_3.4.31
 FUNC:_ZSt21_Rb_tree_rotate_rightPSt18_Rb_tree_node_baseRS0_@@GLIBCXX_3.4
 
FUNC:_ZSt21__copy_streambufs_eofIcSt11char_traitsIcEElPSt15basic_streambufIT_T0_ES6_Rb@@GLIBCXX_3.4.9
 
FUNC:_ZSt21__copy_streambufs_eofIwSt11char_traitsIwEElPSt15basic_streambufIT_T0_ES6_Rb@@GLIBCXX_3.4.9
 FUNC:_ZSt21__glibcxx_assert_failPKciS0_S0_@@GLIBCXX_3.4.30
 FUNC:_ZSt21__throw_bad_exceptionv@@GLIBCXX_3.4
 FUNC:_ZSt21__throw_runtime_errorPKc@@GLIBCXX_3.4
+FUNC:_ZSt21__to_chars_bfloat16_tPcS_fSt12chars_format@@GLIBCXX_3.4.31
+FUNC:_ZSt22__from_chars_float16_tPKcS0_RfSt12chars_format@@GLIBCXX_3.4.31
 FUNC:_ZSt22__throw_overflow_errorPKc@@GLIBCXX_3.4
+FUNC:_ZSt23__from_chars_bfloat16_tPKcS0_RfSt12chars_format@@GLIBCXX_3.4.31
 FUNC:_ZSt23__throw_underflow_errorPKc@@GLIBCXX_3.4
 FUNC:_ZSt24__throw_invalid_argumentPKc@@GLIBCXX_3.4
 FUNC:_ZSt24__throw_out_of_range_fmtPKcz@@GLIBCXX_3.4.20
@@ -4498,6 +4568,7 @@ OBJECT:0:CXXABI_1.3.10
 OBJECT:0:CXXABI_1.3.11
 OBJECT:0:CXXABI_1.3.12
 OBJECT:0:CXXABI_1.3.13
+OBJECT:0:CXXABI_1.3.14
 OBJECT:0:CXXABI_1.3.2
 OBJECT:0:CXXABI_1.3.3
 OBJECT:0:CXXABI_1.3.4
@@ -4532,6 +4603,7 @@ OBJECT:0:GLIBCXX_3.4.28
 OBJECT:0:GLIBCXX_3.4.29
 OBJECT:0:GLIBCXX_3.4.3
 OBJECT:0:GLIBCXX_3.4.30
+OBJECT:0:GLIBCXX_3.4.31
 OBJECT:0:GLIBCXX_3.4.4
 OBJECT:0:GLIBCXX_3.4.5
 OBJECT:0:GLIBCXX_3.4.6
@@ -4603,6 +4675,12 @@ OBJECT:15:_ZTSSt8messagesIcE@@GLIBCXX_3.4
 OBJECT:15:_ZTSSt8messagesIwE@@GLIBCXX_3.4
 OBJECT:15:_ZTSSt8numpunctIcE@@GLIBCXX_3.4
 OBJECT:15:_ZTSSt8numpunctIwE@@GLIBCXX_3.4
+OBJECT:16:_ZTIDF128_@@CXXABI_1.3.14
+OBJECT:16:_ZTIDF16_@@CXXABI_1.3.14
+OBJECT:16:_ZTIDF32_@@CXXABI_1.3.14
+OBJECT:16:_ZTIDF32x@@CXXABI_1.3.14
+OBJECT:16:_ZTIDF64_@@CXXABI_1.3.14
+OBJECT:16:_ZTIDF64x@@CXXABI_1.3.14
 OBJECT:16:_ZTIDd@@CXXABI_1.3.4
 OBJECT:16:_ZTIDe@@CXXABI_1.3.4
 OBJECT:16:_ZTIDf@@CXXABI_1.3.4
@@ -5239,6 +5317,12 @@ 
OBJECT:30:_ZTSSt7codecvtIDiDu11__mbstate_tE@@GLIBCXX_3.4.26
 OBJECT:30:_ZTSSt7codecvtIDsDu11__mbstate_tE@@GLIBCXX_3.4.26
 
OBJECT:32:_ZNSbIwSt11char_traitsIwESaIwEE4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4
 OBJECT:32:_ZNSs4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4
+OBJECT:32:_ZTIPDF128_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPDF16_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPDF32_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPDF32x@@CXXABI_1.3.14
+OBJECT:32:_ZTIPDF64_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPDF64x@@CXXABI_1.3.14
 OBJECT:32:_ZTIPDd@@CXXABI_1.3.4
 OBJECT:32:_ZTIPDe@@CXXABI_1.3.4
 OBJECT:32:_ZTIPDf@@CXXABI_1.3.4
@@ -5246,6 +5330,12 @@ OBJECT:32:_ZTIPDi@@CXXABI_1.3.3
 OBJECT:32:_ZTIPDn@@CXXABI_1.3.5
 OBJECT:32:_ZTIPDs@@CXXABI_1.3.3
 OBJECT:32:_ZTIPDu@@CXXABI_1.3.12
+OBJECT:32:_ZTIPKDF128_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPKDF16_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPKDF32_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPKDF32x@@CXXABI_1.3.14
+OBJECT:32:_ZTIPKDF64_@@CXXABI_1.3.14
+OBJECT:32:_ZTIPKDF64x@@CXXABI_1.3.14
 OBJECT:32:_ZTIPKDd@@CXXABI_1.3.4
 OBJECT:32:_ZTIPKDe@@CXXABI_1.3.4
 OBJECT:32:_ZTIPKDf@@CXXABI_1.3.4
-- 
2.39.1


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] testsuite: adjust patterns in RISC-V tests to skip unwind table directives

2023-02-13 Thread Andreas Schwab via Gcc-patches
On Feb 09 2023, Andrew Pinski via Gcc-patches wrote:

> Maybe you could use check-function-bodies for these files?
> check-function-bodies does remove cfi and other .line directives too
> when doing the scanning.

It doesn't work for negative assertions, though.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


[PATCH] testsuite: adjust patterns in RISC-V tests to skip unwind table directives

2023-02-09 Thread Andreas Schwab via Gcc-patches
\[^\n\]*\n)*\taddi" } } */
 /* The ld insns in load2r are not rewritten because shorten_memrefs currently
only optimizes lw and sw.
-/* { dg-final { scan-assembler "load2r:\n\taddi" { xfail riscv*-*-* } } } */
+/* { dg-final { scan-assembler "load2r:\n(\t?\\.\[^\n\]*\n)*\taddi" { xfail 
riscv*-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-6.c 
b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-6.c
index c36af6d6a5d..b6539b76aaf 100644
--- a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-6.c
+++ b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-6.c
@@ -36,5 +36,5 @@ load2a (long long a0, long long a1, long long a2, long long 
a3, long long a4,
   return sub2 (a0, a1, a2, a3, a4, 0, a);
 }
 
-/* { dg-final { scan-assembler-not "load1a:\n\taddi" { xfail riscv*-*-* } } } 
*/
+/* { dg-final { scan-assembler-not "load1a:\n(\t?\\.\[^\n\]*\n)*\taddi" { 
xfail riscv*-*-* } } } */
 /* { dg-final { scan-assembler-not "load2a:\n.*addi\[ 
\t\]*\[at\]\[0-9\],\[at\]\[0-9\],\[0-9\]*" } } */
diff --git a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-8.c 
b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-8.c
index 6dfc015cf3a..3ff6956b33e 100644
--- a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-8.c
+++ b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-8.c
@@ -23,6 +23,6 @@ load (char *p)
   return a;
 }
 
-/* { dg-final { scan-assembler "store:\n\taddi\ta\[0-7\],a\[0-7\],1" } } */
-/* { dg-final { scan-assembler "load:\n\taddi\ta\[0-7\],a\[0-7\],1" } } */
+/* { dg-final { scan-assembler 
"store:\n(\t?\\.\[^\n\]*\n)*\taddi\ta\[0-7\],a\[0-7\],1" } } */
+/* { dg-final { scan-assembler 
"load:\n(\t?\\.\[^\n\]*\n)*\taddi\ta\[0-7\],a\[0-7\],1" } } */
 
-- 
2.39.1


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] Print padding size when aligning struct member

2023-02-07 Thread Andreas Schwab via Gcc-patches
On Feb 07 2023, Vít Kabele wrote:

> diff --git a/gcc/testsuite/gcc.dg/Wpadded.c b/gcc/testsuite/gcc.dg/Wpadded.c
> index 70fcd79a6d4..357e7f61e4a 100644
> --- a/gcc/testsuite/gcc.dg/Wpadded.c
> +++ b/gcc/testsuite/gcc.dg/Wpadded.c
> @@ -10,5 +10,5 @@
>  
>  struct foo {
>char bar;
> -  long baz; /* { dg-warning "padding struct to align" ""  { target { ! 
> default_packed } } } */
> +  long baz; /* { dg-warning "padding struct with 7 bytes to align" ""  { 
> target { ! default_packed } } } */

The actual amount of padding is target dependent.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


[PATCH] lto-wrapper: Pass through -funwind-tables and -fasynchronous-unwind-tables

2023-02-06 Thread Andreas Schwab via Gcc-patches
The -funwind-tables and -fasynchronous-unwind-tables options are relevant
for the output pass, so they need to be passed through by the LTO wrapper.
Otherwise, dwarf2out_assembly_start may output a ".cfi_sections
.debug_frame" directive when debug info was enabled even if every
translation unit was compiled with -funwind-tables.

gcc/
* lto-wrapper.cc (merge_and_complain): Handle
-funwind-tables and -fasynchronous-unwind-tables.
(append_compiler_options): Likewise.
---
 gcc/lto-wrapper.cc | 4 
 1 file changed, 4 insertions(+)

diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc
index 11c4d1b38a4..fe8c5f6e80d 100644
--- a/gcc/lto-wrapper.cc
+++ b/gcc/lto-wrapper.cc
@@ -335,6 +335,8 @@ merge_and_complain (vec _options,
 
case OPT_fopenmp:
case OPT_fopenacc:
+   case OPT_fasynchronous_unwind_tables:
+   case OPT_funwind_tables:
  /* For selected options we can merge conservatively.  */
  if (existing_opt == -1)
decoded_options.safe_push (*foption);
@@ -737,6 +739,8 @@ append_compiler_options (obstack *argv_obstack, 
vec opts)
case OPT_fopenacc_dim_:
case OPT_foffload_abi_:
case OPT_fcf_protection_:
+   case OPT_fasynchronous_unwind_tables:
+   case OPT_funwind_tables:
case OPT_g:
case OPT_O:
case OPT_Ofast:
-- 
2.39.1


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


[PATCH] riscv: Enable -fasynchronous_unwind_tables by default on Linux

2023-01-26 Thread Andreas Schwab via Gcc-patches
This follows the example of aarch64.

gcc/:
* common/config/riscv/riscv-common.cc
(riscv_option_optimization_table)
[TARGET_DEFAULT_ASYNC_UNWIND_TABLES]: Enable
-fasynchronous_unwind_tables and -funwind-tables.
* config.gcc (riscv*-*-linux*): Define
TARGET_DEFAULT_ASYNC_UNWIND_TABLES.
---
 gcc/common/config/riscv/riscv-common.cc | 4 
 gcc/config.gcc  | 1 +
 2 files changed, 5 insertions(+)

diff --git a/gcc/common/config/riscv/riscv-common.cc 
b/gcc/common/config/riscv/riscv-common.cc
index 2e3116e7673..616e2f897b9 100644
--- a/gcc/common/config/riscv/riscv-common.cc
+++ b/gcc/common/config/riscv/riscv-common.cc
@@ -1756,6 +1756,10 @@ static const struct default_options 
riscv_option_optimization_table[] =
   {
 { OPT_LEVELS_1_PLUS, OPT_fsection_anchors, NULL, 1 },
 { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 },
+#if TARGET_DEFAULT_ASYNC_UNWIND_TABLES == 1
+{ OPT_LEVELS_ALL, OPT_fasynchronous_unwind_tables, NULL, 1 },
+{ OPT_LEVELS_ALL, OPT_funwind_tables, NULL, 1},
+#endif
 { OPT_LEVELS_NONE, 0, NULL, 0 }
   };
 
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 89f56047cfe..744b46fb3b0 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2417,6 +2417,7 @@ riscv*-*-linux*)
*) echo "Unknown value for enable_multilib"; exit 1
esac
tmake_file="${tmake_file} riscv/t-riscv riscv/t-linux"
+   tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
gnu_ld=yes
gas=yes
case $target in
-- 
2.39.1


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-25 Thread Andreas Schwab via Gcc-patches
On Jan 25 2023, Richard Biener wrote:

> where we'd prefer -funwind-tables over -fno-unwind-tables when the
> options do not match
> across TUs.  Note that you likely want to add
> -f[asynchronous-]unwind-tables handling
> in lto-options.cc:lto_write_options as well so the default is streamed
> as explicit option.
> Otherwise a single TU with -fno-unwind-tables on x86-64 would cause
> the whole LTO
> compilation to be built without.

I don't think we actually need to handle -fasynchronous-unwind-tables
here, since that implies -funwind-tables, and only the latter is
relevant for dwarf2out_do_eh_frame.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Michael Matz wrote:

> The purest solution is to emit unwind tables for all functions that 
> request it into .eh_frame and for those that don't request it put 
> into .debug_frame (if also -g is on).

The assembler does not allow switching back to .eh_frame once a
different format has been chosen, so .eh_frame must be either on or off
all the way through.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Jakub Jelinek wrote:

> Neither of that will always match all the states of all the functions.

But if the translation units are compiled with -funwind-tables, we want
the ltrans "units" to behave the same.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Jakub Jelinek wrote:

> Partly OT, what is riscv not defaulting that on as well?  Does it have
> usable unwind info even without that option, something else?

The RISC-V ABI does not address this, AFAICS.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Michael Matz wrote:

> So, it's quite clear that the option merging algorithm related to all this 
> is somewhat broken, the global (or per function, or whatever) 
> -funwind-tables option from hello.o doesn't make it correctly into the 
> output (when -g is there).  Adding -fexception makes it work because then 
> the functions will have personalities and on LTO-read-in _that_ will 
> implicitely enable funwind-tables again (which should have been enabled 
> already by the option-read-in).

My guess is that flag_unwind_tables is not yet set when .cfi_sections is
emitted (which is done by dwarf2out_assembly_start before compile starts).

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Jakub Jelinek wrote:

> That is streamed in by lto1 back and on each set_cfun such saved options
> are stored into global_options{,_set}.

Is that done in time for dwarf2out_do_eh_frame?

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
No unwind tables are generated, as if -funwind-tables is ignored.  If
LTO is disabled, everything works as expected.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Jakub Jelinek wrote:

> With LTO each function has the DECL_FUNCTION_SPECIFIC_OPTIMIZATION
> (and _TARGET), for functions with optimize attribute obviously as without
> LTO specific to what options have been overridden (but with defaults from
> TU's command line etc.), for functions without that simply with what
> options has the TU.

Sorry, I cannot parse that sentence.  Could you please try again?

> lto1 then streams in those options and when switching functions switches
> the global options.

Why does that not work then?

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Jakub Jelinek wrote:

> On Wed, Jan 18, 2023 at 12:25:11PM +0100, Andreas Schwab via Gcc-patches 
> wrote:
>> On Jan 18 2023, Richard Biener wrote:
>> 
>> > On Wed, Jan 18, 2023 at 11:17 AM Andreas Schwab via Gcc-patches
>> >  wrote:
>> >>
>> >> The -funwind-tables and -fasynchronous-unwind-tables options are relevant
>> >> for the output pass, thus they need to be passed through by the lto
>> >> wrapper.
>> >
>> > They are already stored per function, and ...
>> 
>> Are they?  Are you sure you don't confuse that with -fexceptions?
>
> They clearly are:
> fasynchronous-unwind-tables
> Common Var(flag_asynchronous_unwind_tables) Optimization
> Generate unwind tables that are exact at each instruction boundary.
> and
> funwind-tables
> Common Var(flag_unwind_tables) Optimization
> Just generate unwind tables for exception handling.

How is that supposed to work then?

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Richard Biener wrote:

> On Wed, Jan 18, 2023 at 11:17 AM Andreas Schwab via Gcc-patches
>  wrote:
>>
>> The -funwind-tables and -fasynchronous-unwind-tables options are relevant
>> for the output pass, thus they need to be passed through by the lto
>> wrapper.
>
> They are already stored per function, and ...

Are they?  Are you sure you don't confuse that with -fexceptions?

> What exactly are you fixing?

Making -funwind-tables effective in LTO mode.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


[PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
The -funwind-tables and -fasynchronous-unwind-tables options are relevant
for the output pass, thus they need to be passed through by the lto
wrapper.

gcc/
* lto-wrapper.cc (merge_and_complain): Pass through
-funwind-tables and -fasynchronous-unwind-tables.
(append_compiler_options): Likewise.
---
 gcc/lto-wrapper.cc | 4 
 1 file changed, 4 insertions(+)

diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc
index 11c4d1b38a4..627e8238606 100644
--- a/gcc/lto-wrapper.cc
+++ b/gcc/lto-wrapper.cc
@@ -314,6 +314,8 @@ merge_and_complain (vec _options,
case OPT_fshow_column:
case OPT_fcommon:
case OPT_fgnu_tm:
+   case OPT_funwind_tables:
+   case OPT_fasynchronous_unwind_tables:
case OPT_g:
  /* Do what the old LTO code did - collect exactly one option
 setting per OPT code, we pick the first we encounter.
@@ -737,6 +739,8 @@ append_compiler_options (obstack *argv_obstack, 
vec opts)
case OPT_fopenacc_dim_:
case OPT_foffload_abi_:
case OPT_fcf_protection_:
+   case OPT_funwind_tables:
+   case OPT_fasynchronous_unwind_tables:
case OPT_g:
case OPT_O:
case OPT_Ofast:
-- 
2.39.1


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH][2/n] LTO option handling/merging rewrite

2023-01-17 Thread Andreas Schwab via Gcc-patches
On Nov 02 2011, Richard Guenther wrote:

>   lto/
>   * lto-lang.c (lto_post_options): Do not read file options.
>   * lto.c (lto_read_all_file_options): Remove.

This fails to update the documentation.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Re: [PATCH] longlong.h: Do no use asm input cast for clang

2023-01-10 Thread Andreas Schwab
On Jan 10 2023, Segher Boessenkool wrote:

> The file starts with
>
> /* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
>Copyright (C) 1991-2022 Free Software Foundation, Inc.
>
>This file is part of the GNU C Library.
>
> Please change that first then?

GCC is the source of the original version of longlong.h (from 1991).  It
has then been imported into GMP, from where it found its way into GLIBC.
After that, the file has been synchronized back and forth between GCC
and GLIBC.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] RISC-V: Add testcases for VSETVL PASS

2022-12-26 Thread Andreas Schwab
FAIL: gcc.target/riscv/rvv/vsetvl/dump-1.c   -O0  (test for excess errors)
Excess errors:
/usr/include/gnu/stubs.h:8:11: fatal error: gnu/stubs-ilp32.h: No such file or 
directory
compilation terminated.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [Committed] Tweak new gcc.target/i386/pr107548-1.c for -march=cascadelake.

2022-12-25 Thread Andreas Schwab
On Dez 24 2022, Roger Sayle wrote:

> +/* { dg-final { scan-assembler-times "v?paddd" 6 } } */

Since this is not anchored, the v? pattern is redundant.

> +/* { dg-final { scan-assembler-times "v?paddq" 2 } } */
> +/* { dg-final { scan-assembler "v?psrldq" } } */

Likewise.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] RISC-V: Fix ICE for avl_info deprecated copy and pp_print error.

2022-12-24 Thread Andreas Schwab
On Dez 23 2022, juzhe.zh...@rivai.ai wrote:

> * config/riscv/riscv-vsetvl.cc (change_insn): Remove pp_print.
> (avl_info::avl_info): Add copy function.
> (vector_insn_info::dump): Remove pp_print.
> * config/riscv/riscv-vsetvl.h: Add copy function.

Survived bootstrap so far.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] libstdc++: Test for tzdata.zi before fallback version files.

2022-12-24 Thread Andreas Schwab
On Dez 24 2022, Iain Sandoe via Gcc-patches wrote:

> @@ -1083,6 +1078,14 @@ namespace std::chrono
>if (*zif >> hash >> label >> version)
>   if (hash == '#' && label == "version")
> return version;
> +#if defined __NetBSD__
> +if (string ver; ifstream(zoneinfo_dir() + "/TZDATA_VERSION") >> ver)
> +  return ver;
> +#elif defined __APPLE__
> +// The standard install on macOS has no tzdata.zi, but we can find the
> +// version from +VERSION.
> +if (string ver; ifstream(zoneinfo_dir() + "/+VERSION") >> ver)
> +  return ver;
>  #endif
>__throw_runtime_error("tzdb: no version found in tzdata.zi");
>  }

Looks like indentation is off here.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] RISC-V: Support VSETVL PASS for RVV support

2022-12-23 Thread Andreas Schwab
On Dez 23 2022, 钟居哲 wrote:

> Would you mind telling me how you reproduce these errors ?

make bootstrap

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] RISC-V: Support VSETVL PASS for RVV support

2022-12-23 Thread Andreas Schwab
How has this been tested?

In file included from ../../gcc/config/riscv/riscv-vsetvl.cc:89:
../../gcc/config/riscv/riscv-vsetvl.h: In member function 
'riscv_vector::avl_info riscv_vector::vl_vtype_info::get_avl_info() const':
../../gcc/config/riscv/riscv-vsetvl.h:175:43: error: implicitly-declared 
'constexpr riscv_vector::avl_info::avl_info(const riscv_vector::avl_info&)' is 
deprecated [-Werror=deprecated-copy]
  175 |   avl_info get_avl_info () const { return m_avl; }
  |   ^
../../gcc/config/riscv/riscv-vsetvl.h:131:13: note: because 
'riscv_vector::avl_info' has user-provided 'riscv_vector::avl_info& 
riscv_vector::avl_info::operator=(const riscv_vector::avl_info&)'
  131 |   avl_info = (const avl_info &);
  | ^~~~
../../gcc/config/riscv/riscv-vsetvl.cc: In function 'bool 
change_insn(rtl_ssa::function_info*, rtl_ssa::insn_change, rtl_ssa::insn_info*, 
rtx)':
../../gcc/config/riscv/riscv-vsetvl.cc:823:27: error: unquoted whitespace 
character '\x0a' in format [-Werror=format-diag]
  823 |   pp_printf (, "\n");
  |   ^~~~
../../gcc/config/riscv/riscv-vsetvl.cc:847:27: error: unquoted whitespace 
character '\x0a' in format [-Werror=format-diag]
  847 |   pp_printf (, "\n");
  |   ^~~~
../../gcc/config/riscv/riscv-vsetvl.cc: In constructor 
'riscv_vector::vl_vtype_info::vl_vtype_info(riscv_vector::avl_info, uint8_t, 
riscv_vector::vlmul_type, uint8_t, bool, bool)':
../../gcc/config/riscv/riscv-vsetvl.cc:905:5: error: implicitly-declared 
'constexpr riscv_vector::avl_info::avl_info(const riscv_vector::avl_info&)' is 
deprecated [-Werror=deprecated-copy]
  905 |   : m_avl (avl_in), m_sew (sew_in), m_vlmul (vlmul_in), m_ratio 
(ratio_in),
  | ^~
../../gcc/config/riscv/riscv-vsetvl.cc:859:1: note: because 
'riscv_vector::avl_info' has user-provided 'riscv_vector::avl_info& 
riscv_vector::avl_info::operator=(const riscv_vector::avl_info&)'
  859 | avl_info::operator= (const avl_info )
  | ^~~~
../../gcc/config/riscv/riscv-vsetvl.cc: In member function 'void 
riscv_vector::vector_insn_info::dump(FILE*) const':
../../gcc/config/riscv/riscv-vsetvl.cc:1366:27: error: unquoted whitespace 
character '\x0a' in format [-Werror=format-diag]
 1366 |   pp_printf (, "\n");
  |   ^~~~
cc1plus: all warnings being treated as errors
make[3]: *** [../../gcc/config/riscv/t-riscv:59: riscv-vsetvl.o] Error 1

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate

2022-12-17 Thread Andreas Schwab
On Dez 17 2022, Andrew Waterman wrote:

> On Sat, Dec 17, 2022 at 2:10 AM Andreas Schwab  wrote:
>>
>> On Dez 17 2022, Andrew Waterman wrote:
>>
>> > It took me a few minutes to understand the purpose of this chicanery, but
>> > there's indeed a contradiction in the ISA spec.  HINT instructions _do_
>> > affect architectural state in a limited fashion--namely, updating the PC.
>>
>> How can an insn _not_ affect the PC? (Other than the trivial infinite
>> loop.)
>
> Heh, yeah, that's roughly what I meant by "common-sense reading" (and
> that's my rationale for simply clarifying the spec and nuking this
> Xgnuzihintpausestate extension).

My point is that the implicit update of the PC cannot be part of the
architectural state in the first place.  Even the trivial infinite loop
has this, before the actual state change (setting PC back) is performed.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


  1   2   3   4   5   6   7   8   9   10   >