Re: [COMMITTED 2/5] Fix ranger when called from SCEV.

2024-05-13 Thread Jan-Benedict Glaw
On Mon, 2024-05-13 20:19:42 +0200, Jan-Benedict Glaw  wrote:
> On Tue, 2024-04-30 17:24:15 -0400, Andrew MacLeod  wrote:
> > Bootstrapped on x86_64-pc-linux-gnu with no regressions.  pushed.
> 
> Starting with this patch (upstream as
> e8ae56a7dc46e39a48017bb5159e4dc672ec7fad, can still be reproduced with
> 0c585c8d0dd85601a8d116ada99126a48c8ce9fd as of May 13th), my CI builds fail 
> for
> csky-elf in all-target-libgcc by falling into a loop infinite loop:
> 
> ../gcc/configure '--with-pkgversion=basepoints/gcc-15-432-g0c585c8d0dd, built 
> at 1715608899'  \
>   --prefix=/tmp/gcc-csky-elf --enable-werror-always 
> --enable-languages=all\
>   --disable-gcov --disable-shared --disable-threads --target=csky-elf 
> --without-headers
> make V=1 all-gcc
> make V=1 install-strip-gcc
> make V=1 all-target-libgcc

Just to add:

/var/lib/laminar/run/gcc-csky-elf/65/toolchain-build/./gcc/cc1 -quiet   
\
-I . -I . -I ../../.././gcc -I ../../../../gcc/libgcc   
\
-I ../../../../gcc/libgcc/. -I ../../../../gcc/libgcc/../gcc
\
-I ../../../../gcc/libgcc/../include -imultilib ck801   
\
-iprefix 
/var/lib/laminar/run/gcc-csky-elf/65/toolchain-build/gcc/../lib/gcc/csky-elf/15.0.0/
   \
-isystem 
/var/lib/laminar/run/gcc-csky-elf/65/toolchain-build/./gcc/include \
-isystem 
/var/lib/laminar/run/gcc-csky-elf/65/toolchain-build/./gcc/include-fixed   \
-MD unwind-dw2-fde.d -MF unwind-dw2-fde.dep -MP -MT unwind-dw2-fde.o
\
-D IN_GCC -D CROSS_DIRECTORY_STRUCTURE -D IN_LIBGCC2 -D inhibit_libc
\
-D HAVE_CC_TLS -D USE_EMUTLS -D HIDE_EXPORTS
\
-isystem /tmp/gcc-csky-elf/csky-elf/include 
\
-isystem /tmp/gcc-csky-elf/csky-elf/sys-include 
\
-isystem ./include ../../../../gcc/libgcc/unwind-dw2-fde.c -quiet   
\
-dumpbase unwind-dw2-fde.c -dumpbase-ext .c -mcpu=ck801 -g -g -g -O2 
-O2 -O2\
-Wextra -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual 
-Wstrict-prototypes\
-Wmissing-prototypes -Wold-style-definition -fbuilding-libgcc 
-fno-stack-protector  \
-fexceptions -fvisibility=hidden -o /tmp/cc3SHedS.s

> (gdb) bt
> #0  0x0098f1df in bitmap_list_find_element (head=0x38f2e18, 
> indx=5001) at ../../gcc/gcc/bitmap.cc:375
> #1  bitmap_set_bit (head=0x38f2e18, bit=640244) at ../../gcc/gcc/bitmap.cc:962
> #2  0x00d39cd1 in process_bb_lives (bb=, 
> curr_point=@0x7ffe062c1b2c: 3039473, dead_insn_p=) at 
> ../../gcc/gcc/lra-lives.cc:889
> #3  lra_create_live_ranges_1 (all_p=all_p@entry=true, dead_insn_p= out>) at ../../gcc/gcc/lra-lives.cc:1416
> #4  0x00d3b810 in lra_create_live_ranges (all_p=all_p@entry=true, 
> dead_insn_p=) at ../../gcc/gcc/lra-lives.cc:1486
> #5  0x00d1a8bd in lra (f=, verbose=) at 
> ../../gcc/gcc/lra.cc:2482
> #6  0x00cd0e18 in do_reload () at ../../gcc/gcc/ira.cc:5973
> #7  (anonymous namespace)::pass_reload::execute (this=) at 
> ../../gcc/gcc/ira.cc:6161
> #8  0x00de6368 in execute_one_pass (pass=pass@entry=0x367c490) at 
> ../../gcc/gcc/passes.cc:2647
> #9  0x00de6c00 in execute_pass_list_1 (pass=0x367c490) at 
> ../../gcc/gcc/passes.cc:2756
> #10 0x00de6c12 in execute_pass_list_1 (pass=0x367b2f0) at 
> ../../gcc/gcc/passes.cc:2757
> #11 0x00de6c39 in execute_pass_list (fn=0x7f24a1c06240, 
> pass=) at ../../gcc/gcc/passes.cc:2767
> #12 0x00a188c6 in cgraph_node::expand (this=0x7f24a1bfaaa0) at 
> ../../gcc/gcc/context.h:48
> #13 cgraph_node::expand (this=0x7f24a1bfaaa0) at 
> ../../gcc/gcc/cgraphunit.cc:1798
> #14 0x00a1a69b in expand_all_functions () at 
> ../../gcc/gcc/cgraphunit.cc:2028
> #15 symbol_table::compile (this=0x7f24a205b000) at 
> ../../gcc/gcc/cgraphunit.cc:2404
> #16 0x00a1ccb8 in symbol_table::compile (this=0x7f24a205b000) at 
> ../../gcc/gcc/cgraphunit.cc:2315
> #17 symbol_table::finalize_compilation_unit (this=0x7f24a205b000) at 
> ../../gcc/gcc/cgraphunit.cc:2589
> #18 0x00f0932d in compile_file () at ../../gcc/gcc/toplev.cc:476
> #19 0x00839648 in do_compile () at ../../gcc/gcc/toplev.cc:2158
> #20 toplev::main (this=this@entry=0x7ffe062c1f2e, argc=, 
> argc@entry=78, argv=, argv@entry=0x7ffe062c2058) at 
> ../../gcc/gcc/toplev.cc:2314
> #21 0x0083ad9e in main (argc=78, argv=0x7ffe062c2058) at 
> ../../gcc/gcc/main.cc:39
> 
> (Loop is based in process_bb_lives(), looping in the
> FOR_BB_INSNS_REVERSE_SAFE (bb, curr_insn, next) block starting at
> about line 696.)

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [COMMITTED 2/5] Fix ranger when called from SCEV.

2024-05-13 Thread Jan-Benedict Glaw
On Tue, 2024-04-30 17:24:15 -0400, Andrew MacLeod  wrote:
> Bootstrapped on x86_64-pc-linux-gnu with no regressions.  pushed.

Starting with this patch (upstream as
e8ae56a7dc46e39a48017bb5159e4dc672ec7fad, can still be reproduced with
0c585c8d0dd85601a8d116ada99126a48c8ce9fd as of May 13th), my CI builds fail for
csky-elf in all-target-libgcc by falling into a loop infinite loop:

../gcc/configure '--with-pkgversion=basepoints/gcc-15-432-g0c585c8d0dd, built 
at 1715608899'\
--prefix=/tmp/gcc-csky-elf --enable-werror-always 
--enable-languages=all\
--disable-gcov --disable-shared --disable-threads --target=csky-elf 
--without-headers
make V=1 all-gcc
make V=1 install-strip-gcc
make V=1 all-target-libgcc

(gdb) bt
#0  0x0098f1df in bitmap_list_find_element (head=0x38f2e18, indx=5001) 
at ../../gcc/gcc/bitmap.cc:375
#1  bitmap_set_bit (head=0x38f2e18, bit=640244) at ../../gcc/gcc/bitmap.cc:962
#2  0x00d39cd1 in process_bb_lives (bb=, 
curr_point=@0x7ffe062c1b2c: 3039473, dead_insn_p=) at 
../../gcc/gcc/lra-lives.cc:889
#3  lra_create_live_ranges_1 (all_p=all_p@entry=true, dead_insn_p=) at ../../gcc/gcc/lra-lives.cc:1416
#4  0x00d3b810 in lra_create_live_ranges (all_p=all_p@entry=true, 
dead_insn_p=) at ../../gcc/gcc/lra-lives.cc:1486
#5  0x00d1a8bd in lra (f=, verbose=) at 
../../gcc/gcc/lra.cc:2482
#6  0x00cd0e18 in do_reload () at ../../gcc/gcc/ira.cc:5973
#7  (anonymous namespace)::pass_reload::execute (this=) at 
../../gcc/gcc/ira.cc:6161
#8  0x00de6368 in execute_one_pass (pass=pass@entry=0x367c490) at 
../../gcc/gcc/passes.cc:2647
#9  0x00de6c00 in execute_pass_list_1 (pass=0x367c490) at 
../../gcc/gcc/passes.cc:2756
#10 0x00de6c12 in execute_pass_list_1 (pass=0x367b2f0) at 
../../gcc/gcc/passes.cc:2757
#11 0x00de6c39 in execute_pass_list (fn=0x7f24a1c06240, pass=) at ../../gcc/gcc/passes.cc:2767
#12 0x00a188c6 in cgraph_node::expand (this=0x7f24a1bfaaa0) at 
../../gcc/gcc/context.h:48
#13 cgraph_node::expand (this=0x7f24a1bfaaa0) at 
../../gcc/gcc/cgraphunit.cc:1798
#14 0x00a1a69b in expand_all_functions () at 
../../gcc/gcc/cgraphunit.cc:2028
#15 symbol_table::compile (this=0x7f24a205b000) at 
../../gcc/gcc/cgraphunit.cc:2404
#16 0x00a1ccb8 in symbol_table::compile (this=0x7f24a205b000) at 
../../gcc/gcc/cgraphunit.cc:2315
#17 symbol_table::finalize_compilation_unit (this=0x7f24a205b000) at 
../../gcc/gcc/cgraphunit.cc:2589
#18 0x00f0932d in compile_file () at ../../gcc/gcc/toplev.cc:476
#19 0x00839648 in do_compile () at ../../gcc/gcc/toplev.cc:2158
#20 toplev::main (this=this@entry=0x7ffe062c1f2e, argc=, 
argc@entry=78, argv=, argv@entry=0x7ffe062c2058) at 
../../gcc/gcc/toplev.cc:2314
#21 0x0083ad9e in main (argc=78, argv=0x7ffe062c2058) at 
../../gcc/gcc/main.cc:39

(Loop is based in process_bb_lives(), looping in the
FOR_BB_INSNS_REVERSE_SAFE (bb, curr_insn, next) block starting at
about line 696.)

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH v2 1/2] Implement ASM_DECLARE_FUNCTION_NAME using ASM_OUTPUT_FUNCTION_LABEL

2024-01-12 Thread Jan-Benedict Glaw
On Tue, 2024-01-02 20:41:37 +0100, Ilya Leoshkevich  wrote:
> diff --git a/gcc/config/ia64/ia64.cc b/gcc/config/ia64/ia64.cc
> index ac566efcf19..92d00bf922f 100644
> --- a/gcc/config/ia64/ia64.cc
> +++ b/gcc/config/ia64/ia64.cc
> @@ -3886,8 +3886,7 @@ ia64_expand_prologue (void)
>  /* Output the textual info surrounding the prologue.  */
>  
>  void
> -ia64_start_function (FILE *file, const char *fnname,
> -  tree decl ATTRIBUTE_UNUSED)
> +ia64_start_function (FILE *file, const char *fnname, tree decl)
>  {
>  #if TARGET_ABI_OPEN_VMS
>vms_start_function (fnname);
> @@ -3896,7 +3895,7 @@ ia64_start_function (FILE *file, const char *fnname,
>fputs ("\t.proc ", file);
>assemble_name (file, fnname);
>fputc ('\n', file);
> -  ASM_OUTPUT_LABEL (file, fnname);
> +  ASM_OUTPUT_FUNCTION_LABEL (file, fnname, decl);
>  }
>  
>  /* Called after register allocation to add any instructions needed for the

Seems for this I'll get a new warning (forced to error by configuring
with --enable-werror-always), cf. 
http://toolchain.lug-owl.de/laminar/log/gcc-ia64-elf/48 :

[all 2024-01-12 16:32:32] 
/var/lib/laminar/run/gcc-ia64-elf/48/local-toolchain-install/bin/g++  -fno-PIE 
-c   -g -O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Wconditionally-supported 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -fno-PIE -I. -I. 
-I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include  
-I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody  
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd 
-I../libdecnumber -I../../gcc/gcc/../libbacktrace   -o ia64.o -MT ia64.o -MMD 
-MP -MF ./.deps/ia64.TPo ../../gcc/gcc/config/ia64/ia64.cc
[all 2024-01-12 16:32:34] ../../gcc/gcc/config/ia64/ia64.cc: In function 'void 
ia64_start_function(FILE*, const char*, tree)':
[all 2024-01-12 16:32:34] ../../gcc/gcc/config/ia64/ia64.cc:3889:59: error: 
unused parameter 'decl' [-Werror=unused-parameter]
[all 2024-01-12 16:32:34]  3889 | ia64_start_function (FILE *file, const char 
*fnname, tree decl)
[all 2024-01-12 16:32:34]   |   
   ~^~~~
[all 2024-01-12 16:32:49] cc1plus: all warnings being treated as errors
[all 2024-01-12 16:32:49] make[1]: *** [Makefile:2555: ia64.o] Error 1


So the ATTRIBUTE_UNUSED seems to be a good cover, or update the
ASM_OUTPUT_FUNCTION_LABEL macro to always "use" its last argument.

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [patch,avr,applied] PR target/112952 Fix attribute "io" et al. handling.

2024-01-11 Thread Jan-Benedict Glaw
On Thu, 2024-01-04 17:28:02 +0100, Georg-Johann Lay  wrote:
> This fixes the avr-specific attributes io, io_low and address,
> that are all basically the same except that io and io_low imply
> assertions on allowed addressing modes.

> --- a/gcc/config/avr/avr.cc
> +++ b/gcc/config/avr/avr.cc
[...]
> @@ -10385,12 +10389,10 @@ avr_handle_addr_attribute (tree *node, tree name, 
> tree args,
>   }
>else if (io_p
>  && (!tree_fits_shwi_p (arg)
> -|| !(strcmp (IDENTIFIER_POINTER (name), "io_low") == 0
> - ? low_io_address_operand : io_address_operand)
> -  (GEN_INT (TREE_INT_CST_LOW (arg)), QImode)))
> +|| ! IN_RANGE (TREE_INT_CST_LOW (arg), io_start, io_end)))
>   {
> -   warning_at (loc, OPT_Wattributes, "%qE attribute address "
> -   "out of range", name);
> +   warning_at (loc, OPT_Wattributes, "%qE attribute address out of "
> +   "range 0x%x...0x%x", name, (int) io_start, (int) io_end);
> *no_add = true;
>   }
>else

Building with a recent GCC, this results in a new warning (here forced
to an error with --enable-werror-alway--enable-werror-always):

/var/lib/laminar/run/gcc-avr-elf/64/local-toolchain-install/bin/g++  -fno-PIE 
-c   -g -O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Wconditionally-supported 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -fno-PIE -I. -I. 
-I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include  
-I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody  
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd 
-I../libdecnumber -I../../gcc/gcc/../libbacktrace   -o avr.o -MT avr.o -MMD -MP 
-MF ./.deps/avr.TPo ../../gcc/gcc/config/avr/avr.cc
../../gcc/gcc/config/avr/avr.cc: In function 'tree_node* 
avr_handle_addr_attribute(tree_node**, tree, tree, int, bool*)':
../../gcc/gcc/config/avr/avr.cc:10391:45: error: unquoted sequence of 3 
consecutive punctuation characters '...' in format [-Werror=format-diag]
10391 |   warning_at (loc, OPT_Wattributes, "%qE attribute address out 
of "
  | 
^~~
10392 |   "range 0x%x...0x%x", name, (int) io_start, (int) 
io_end);
  |   ~~~
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:2554: avr.o] Error 1
make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-avr-elf/64/toolchain-build/gcc'
make: *** [Makefile:4676: all-gcc] Error 2


I think this should be "%<...%>".

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH 3/6] arm: [MVE intrinsics] Add support for contiguous loads and stores

2023-11-23 Thread Jan-Benedict Glaw
On Thu, 2023-11-16 15:26:14 +, Christophe Lyon  
wrote:
> diff --git a/gcc/config/arm/arm-mve-builtins-functions.h 
> b/gcc/config/arm/arm-mve-builtins-functions.h
> index eba1f071af0..6d234a2dd7c 100644
> --- a/gcc/config/arm/arm-mve-builtins-functions.h
> +++ b/gcc/config/arm/arm-mve-builtins-functions.h
> @@ -966,6 +966,62 @@ public:
[...]

> +class full_width_access : public multi_vector_function
> +{
> +public:
> +  CONSTEXPR full_width_access (unsigned int vectors_per_tuple = 1)
> +: multi_vector_function (vectors_per_tuple) {}
> +
> +  tree
> +  memory_scalar_type (const function_instance ) const override
> +  {
> +return fi.scalar_type (0);
> +  }
> +
> +  machine_mode
> +  memory_vector_mode (const function_instance ) const override
> +  {
> +machine_mode mode = fi.vector_mode (0);
> +/* Vectors of floating-point are managed in memory as vectors of
> +   integers.  */
> +switch (mode)
> +  {
> +  case E_V4SFmode:
> + mode = E_V4SImode;
> + break;
> +  case E_V8HFmode:
> + mode = E_V8HImode;
> + break;
> +  }

This introduces warnings about many enum values not being handled, so
a default would be good I think. (I do automated builds with
--enable-werror-always, see eg.
http://toolchain.lug-owl.de/laminar/log/gcc-arm-eabi/48)

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH] LoongArch: Adjust makefile dependency for loongarch headers.

2023-10-08 Thread Jan-Benedict Glaw
On Sat, 2023-10-07 16:50:14 +0800, Yang Yujie  wrote:
> gcc/ChangeLog:
> 
>   * config.gcc: Add loongarch-driver.h to tm_files.
>   * config/loongarch/loongarch.h: Do not include loongarch-driver.h.
>   * config/loongarch/t-loongarch: Append loongarch-multilib.h to $(GTM_H)
>   instead of $(TM_H) for building generator programs.
> ---
>  gcc/config.gcc   | 2 +-
>  gcc/config/loongarch/loongarch.h | 3 ---
>  gcc/config/loongarch/t-loongarch | 3 ++-
>  3 files changed, 3 insertions(+), 5 deletions(-)

This patch fixes it for me:

http://toolchain.lug-owl.de/laminar/jobs/gcc-loongarch64-linux-gnuf64
http://toolchain.lug-owl.de/laminar/jobs/gcc-loongarch64-linux-gnuf32
http://toolchain.lug-owl.de/laminar/jobs/gcc-loongarch64-linux-gnusf
http://toolchain.lug-owl.de/laminar/jobs/gcc-loongarch64-linux

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH] LoongArch: Reimplement multilib build option handling.

2023-10-07 Thread Jan-Benedict Glaw
Hi!

On Sat, 2023-10-07 15:08:34 +0800, Xi Ruoyao  wrote:
> On Sat, 2023-10-07 at 11:41 +0800, Yang Yujie wrote:
> > Thanks for the testing!
> > 
> > This error seems to be difficult to reproduce since it is a makefile 
> > dependency
> > problem.  I think appending loongarch-multilib.h to $(GTM_H) instead of 
> > $(TM_H)
> > could help.
> 
> FWIW such issues are easier to reproduce with a high -j number.  I can
> easily reproduce it with -j32 on a 3C5000-based server.

That's interesting. It showed up on all of my CI builds and I don't do
parallel builds at all (as I'd like to be able to `diff` the build
logs after sanitizing eg. timestamps and the build path.)

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH] LoongArch: Reimplement multilib build option handling.

2023-10-04 Thread Jan-Benedict Glaw
Hi!

On Wed, 2023-09-13 17:52:14 +0800, Yang Yujie  wrote:
> Library build options from --with-multilib-list used to be processed with
> *self_spec, which missed the driver's initial canonicalization.  This
> caused limitations on CFLAGS override and the use of driver-only options
> like -m[no]-lsx.
> 
> The problem is solved by promoting the injection rules of --with-multilib-list
> options to the first element of DRIVER_SELF_SPECS, to make them execute before
> the canonialization.  The library-build options are also hard-coded in
> the driver and can be used conveniently by the builders of other non-gcc
> libraries via the use of -fmultiflags.
> 
> Bootstrapped and tested on loongarch64-linux-gnu.

Seems this breaks for me with

../gcc/configure [...] --enable-werror-always --enable-languages=all 
--disable-gcov --disable-shared --disable-threads 
--target=loongarch64-linux-gnuf32 --without-headers
make V=1 all-gcc


See eg. 
http://toolchain.lug-owl.de/laminar/jobs/gcc-loongarch64-linux-gnuf32/44 :

/var/lib/laminar/run/gcc-loongarch64-linux-gnuf32/44/local-toolchain-install/bin/g++
 -c   -g -O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Wconditionally-supported 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE 
-I. -Ibuild -I../../gcc/gcc -I../../gcc/gcc/build -I../../gcc/gcc/../include  
-I../../gcc/gcc/../libcpp/include  \
 -o build/genpreds.o ../../gcc/gcc/genpreds.cc
In file included from ../../gcc/gcc/config/loongarch/loongarch.h:53,
 from ./tm.h:50,
 from ../../gcc/gcc/genpreds.cc:26:
../../gcc/gcc/config/loongarch/loongarch-driver.h:82:10: fatal error: 
loongarch-multilib.h: No such file or directory
   82 | #include "loongarch-multilib.h"
  |  ^~
compilation terminated.
make[1]: *** [Makefile:2966: build/genpreds.o] Error 1
make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-loongarch64-linux-gnuf32/44/toolchain-build/gcc'
make: *** [Makefile:4659: all-gcc] Error 2


So it failed to execute the t-multilib fragment? Happens for all my
loongarch compilation tests:

http://toolchain.lug-owl.de/laminar/jobs/gcc-loongarch64-linux/45
http://toolchain.lug-owl.de/laminar/jobs/gcc-loongarch64-linux-gnuf32/44
http://toolchain.lug-owl.de/laminar/jobs/gcc-loongarch64-linux-gnuf64/44
http://toolchain.lug-owl.de/laminar/jobs/gcc-loongarch64-linux-gnusf/44

And when this is fixed, it might be a nice idea to have a
--with-multilib-list config in ./contrib/config-list.mk .

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Remove poly_int_pod

2023-10-02 Thread Jan-Benedict Glaw
Hi Richard,

On Thu, 2023-09-28 10:55:46 +0100, Richard Sandiford 
 wrote:
> poly_int was written before the switch to C++11 and so couldn't
> use explicit default constructors.  This led to an awkward split
> between poly_int_pod and poly_int.  poly_int simply inherited from
> poly_int_pod and added constructors, with the argumentless constructor
> having an empty body.  But inheritance meant that poly_int had to
> repeat the assignment operators from poly_int_pod (again, no C++11,
> so no "using" to inherit base-class implementations).
[...]

I haven't bisected it, but I guess your patch caused this:

[all 2023-10-02 06:59:02] 
/var/lib/laminar/run/gcc-local/75/local-toolchain-install/bin/g++ -std=c++11  
-fno-PIE -c   -g -O2   -DIN_GCC-fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Wconditionally-supported 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -fno-PIE -I. -I. 
-I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include  
-I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody  
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid 
-I../libdecnumber -I../../gcc/gcc/../libbacktrace   -o rtl-tests.o -MT 
rtl-tests.o -MMD -MP -MF ./.deps/rtl-tests.TPo ../../gcc/gcc/rtl-tests.cc
[all 2023-10-02 06:59:04] In file included from ../../gcc/gcc/coretypes.h:480,
[all 2023-10-02 06:59:04]  from ../../gcc/gcc/rtl-tests.cc:22:
[all 2023-10-02 06:59:04] ../../gcc/gcc/poly-int.h: In instantiation of 
'constexpr poly_int::poly_int(poly_int_full, const Cs& ...) [with Cs = 
{int, int}; unsigned int N = 1; C = long int]':
[all 2023-10-02 06:59:04] ../../gcc/gcc/poly-int.h:439:13:   required from here
[all 2023-10-02 06:59:04] ../../gcc/gcc/rtl-tests.cc:249:25:   in 'constexpr' 
expansion of 'poly_int<1, long int>(1, 1)'
[all 2023-10-02 06:59:04] ../../gcc/gcc/poly-int.h:453:5: error: too many 
initializers for 'long int [1]'
[all 2023-10-02 06:59:04]   453 |   : coeffs { (typename poly_coeff_traits::
[all 2023-10-02 06:59:04]   | ^
[all 2023-10-02 06:59:04]   454 |   template init_cast::type 
(cs))... } {}
[all 2023-10-02 06:59:04]   |   
~~~
[all 2023-10-02 06:59:04] make[1]: *** [Makefile:1188: rtl-tests.o] Error 1
[all 2023-10-02 06:59:04] make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-local/75/toolchain-build/gcc'
[all 2023-10-02 06:59:05] make: *** [Makefile:4993: all-gcc] Error 2


(Full build log at
http://toolchain.lug-owl.de/laminar/jobs/gcc-local/75 .  That's in a
Docker container on amd64-linux with the host gcc being at fairly new
at basepoints/gcc-14-3827-g30e6ee07458)

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH v6] RISC-V:Optimize the MASK opt generation

2023-10-01 Thread Jan-Benedict Glaw
On Mon, 2023-10-02 10:55:25 +0800, Kito Cheng  wrote:
> Hi Gerald:
> 
> Thanks for reporting this issue, I just realized multidimensional
> arrays are gawk extensions, could you try the attached patch to see if
> it can resolve the issue?

With your new patch, it works for me again using `mawk` (cf.
http://toolchain.lug-owl.de/laminar/jobs/gcc-local/75), but please
also keep using TABs in opt-read.awk ("if (target_var)").

MfG, JBG

-- 


signature.asc
Description: PGP signature


[PATCH] Fix code_helper unused argument warning for fr30

2023-08-17 Thread Jan-Benedict Glaw
Hi!

fr30 is the only target defining GO_IF_LEGITIMATE_ADDRESS right now, in
which case the `code_helper ch` argument to memory_address_addr_space_p()
is unused and emits a new warning.

gcc/ChangeLog:
* recog.cc (memory_address_addr_space_p): Mark possibly unused
argument as unused.

diff --git a/gcc/recog.cc b/gcc/recog.cc
index 2bff6c03e4d..92f151248a6 100644
--- a/gcc/recog.cc
+++ b/gcc/recog.cc
@@ -1803,7 +1803,7 @@ pop_operand (rtx op, machine_mode mode)
 
 bool
 memory_address_addr_space_p (machine_mode mode ATTRIBUTE_UNUSED, rtx addr,
-addr_space_t as, code_helper ch)
+addr_space_t as, code_helper ch ATTRIBUTE_UNUSED)
 {
 #ifdef GO_IF_LEGITIMATE_ADDRESS
   gcc_assert (ADDR_SPACE_GENERIC_P (as));



Ok for trunk?

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [PATCH] config-list.mk Darwin: Use --with-gnu-as

2023-08-16 Thread Jan-Benedict Glaw
Hi Rainer!

On Tue, 2023-08-15 21:49:37 +0200, Rainer Orth  
wrote:
> > config-list.mk Darwin: Use --with-gnu-as for mass-building tests
> >
> > As `config-list.mk` is probably mostly used on Linux system, where
> > Apple's tools aren't around. Let's use --with-gnu-as instead to have
> > an useable assembler.
> >
> > contrib/ChangeLog:
> >
> > * config-list.mk (i686-apple-darwin): Use --with-gnu-as.
> > (i686-apple-darwin9): Ditto.
> > (i686-apple-darwin10): Ditto.
> > (powerpc-darwin8): Ditto.
> > (powerpc-darwin7): Ditto.
> > (powerpc64-darwin): Ditto.
> > (x86_64-apple-darwin): Ditto.
> 
> this doesn't seem right: binutils toplevel configure.ac has gas in
> noconfigdirs for all but i?86-*-darwin*.

You are right, I have to retract this patch. I had a similar patch
running for some Solaris variant and initially built this one
accordingly. However, in the end it didn't work (as you expected from
configure.ac), but I didn't drop it from my patch directory.

Sorry for the noise,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


[PATCH] config-list.mk Darwin: Use --with-gnu-as

2023-08-15 Thread Jan-Benedict Glaw
Hi!

config-list.mk Darwin: Use --with-gnu-as for mass-building tests

As `config-list.mk` is probably mostly used on Linux system, where
Apple's tools aren't around. Let's use --with-gnu-as instead to have
an useable assembler.

contrib/ChangeLog:

* config-list.mk (i686-apple-darwin): Use --with-gnu-as.
(i686-apple-darwin9): Ditto.
(i686-apple-darwin10): Ditto.
(powerpc-darwin8): Ditto.
(powerpc-darwin7): Ditto.
(powerpc64-darwin): Ditto.
(x86_64-apple-darwin): Ditto.

diff --git a/contrib/config-list.mk b/contrib/config-list.mk
index e570b13c71b..02d1a4fe6d2 100644
--- a/contrib/config-list.mk
+++ b/contrib/config-list.mk
@@ -47,7 +47,9 @@ LIST = aarch64-elf aarch64-freebsd13 aarch64-linux-gnu 
aarch64-rtems \
   hppa-linux-gnuOPT-enable-sjlj-exceptions=yes hppa64-linux-gnu \
   hppa64-hpux11.3 \
   hppa64-hpux11.0OPT-enable-sjlj-exceptions=yes \
-  i686-pc-linux-gnu i686-apple-darwin i686-apple-darwin9 i686-apple-darwin10 \
+  i686-pc-linux-gnu \
+  i686-apple-darwinOPT-with-gnu-as i686-apple-darwin9OPT-with-gnu-as \
+  i686-apple-darwin10OPT-with-gnu-as \
   i686-freebsd13 i686-kfreebsd-gnu \
   i686-netbsdelf9 \
   i686-openbsd i686-elf i686-kopensolaris-gnu i686-gnu \
@@ -75,8 +77,8 @@ LIST = aarch64-elf aarch64-freebsd13 aarch64-linux-gnu 
aarch64-rtems \
   nvptx-none \
   or1k-elf or1k-linux-uclibc or1k-linux-musl or1k-rtems \
   pdp11-aout \
-  powerpc-darwin8 \
-  powerpc-darwin7 powerpc64-darwin powerpc-freebsd13 powerpc-netbsd \
+  powerpc-darwin8OPT-with-gnu-as \
+  powerpc-darwin7OPT-with-gnu-as powerpc64-darwinOPT-with-gnu-as 
powerpc-freebsd13 powerpc-netbsd \
   powerpc-eabisimaltivec powerpc-eabisim ppc-elf \
   powerpc-eabialtivec powerpc-xilinx-eabi powerpc-eabi \
   powerpc-rtems \
@@ -96,7 +98,7 @@ LIST = aarch64-elf aarch64-freebsd13 aarch64-linux-gnu 
aarch64-rtems \
   sparc-wrs-vxworks sparc64-elf sparc64-rtems sparc64-linux \
   sparc64-netbsd sparc64-openbsd \
   v850e1-elf v850e-elf v850-elf v850-rtems vax-linux-gnu \
-  vax-netbsdelf visium-elf x86_64-apple-darwin x86_64-gnu \
+  vax-netbsdelf visium-elf x86_64-apple-darwinOPT-with-gnu-as x86_64-gnu \
   x86_64-pc-linux-gnuOPT-with-fpmath=avx \
   x86_64-elfOPT-with-fpmath=sse x86_64-freebsd13 x86_64-netbsd \
   x86_64-w64-mingw32 \


Okay for trunk?

Thanks,
  Jan-Benedict


-- 


signature.asc
Description: PGP signature


[PATCH] config-list.mk i686-solaris2.11: Use --with-gnu-as

2023-08-15 Thread Jan-Benedict Glaw
Hi!

i686-solaris2.11: Use --with-gnu-as for mass-building tests

As `config-list.mk` is probably mostly used on Linux system, where
Solaris's `as` isn't available, let's use GNU `as` as the default.

contrib/ChangeLog:

* config-list.mk (i686-solaris2.11): Use --with-gnu-as.

diff --git a/contrib/config-list.mk b/contrib/config-list.mk
index e570b13c71b..cb158a6c71e 100644
--- a/contrib/config-list.mk
+++ b/contrib/config-list.mk
@@ -52,7 +52,7 @@ LIST = aarch64-elf aarch64-freebsd13 aarch64-linux-gnu 
aarch64-rtems \
   i686-netbsdelf9 \
   i686-openbsd i686-elf i686-kopensolaris-gnu i686-gnu \
   i686-pc-msdosdjgpp i686-lynxos i686-nto-qnx \
-  i686-rtems i686-solaris2.11 i686-wrs-vxworks \
+  i686-rtems i686-solaris2.11OPT-with-gnu-as i686-wrs-vxworks \
   i686-wrs-vxworksae \
   i686-cygwinOPT-enable-threads=yes i686-mingw32crt ia64-elf \
   ia64-linux ia64-hpux ia64-hp-vms iq2000-elf lm32-elf \

Okay for trunk?

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [PATCH 2/3] ivopts: Call valid_mem_ref_p with code_helper [PR110248]

2023-08-14 Thread Jan-Benedict Glaw
On Fri, 2023-06-30 13:46:40 +0800, Kewen.Lin via Gcc-patches 
 wrote:
> Bootstrapped and regtested on x86_64-redhat-linux and
> powerpc64{,le}-linux-gnu.
> 
> Is it ok for trunk?
[...]

> diff --git a/gcc/recog.h b/gcc/recog.h
> index badf8e3dc1c..c6ef619c5dd 100644
> --- a/gcc/recog.h
> +++ b/gcc/recog.h
> @@ -20,6 +20,9 @@ along with GCC; see the file COPYING3.  If not see
>  #ifndef GCC_RECOG_H
>  #define GCC_RECOG_H
> 
> +/* For enum tree_code ERROR_MARK.  */
> +#include "tree.h"
> +
>  /* Random number that should be large enough for all purposes.  Also define
> a type that has at least MAX_RECOG_ALTERNATIVES + 1 bits, with the extra
> bit giving an invalid value that can be used to mean "uninitialized".  */

This part breaks for me (up-to-date amd64-linux host, cf. for example
http://toolchain.lug-owl.de/laminar/jobs/gcc-local/82):

configure   '--with-pkgversion=basepoints/gcc-14-3093-g4a8e6fa8016, built 
at 1691996332'\
--prefix=/var/lib/laminar/run/gcc-local/82/toolchain-install
\
--enable-werror-always  
\
--enable-languages=all  
\
--disable-multilib
make V=1 all-gcc

echo timestamp > s-preds-h
TARGET_CPU_DEFAULT="" \
HEADERS="config/i386/i386-d.h" DEFINES="" \
/bin/bash ../../gcc/gcc/mkconfig.sh tm_d.h
/var/lib/laminar/run/gcc-local/82/local-toolchain-install/bin/g++ -std=c++11 -c 
  -g -O2   -DIN_GCC-fno-exceptions -fno-rtti -fasynchronous-unwind-tables 
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute 
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  
-DHAVE_CONFIG_H  -DGENERATOR_FILE -I. -Ibuild -I../../gcc/gcc 
-I../../gcc/gcc/build -I../../gcc/gcc/../include  
-I../../gcc/gcc/../libcpp/include  \
 -o build/genflags.o ../../gcc/gcc/genflags.cc
/var/lib/laminar/run/gcc-local/82/local-toolchain-install/bin/g++ -std=c++11   
-g -O2   -DIN_GCC-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W 
-Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute 
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  
-DHAVE_CONFIG_H  -DGENERATOR_FILE -static-libstdc++ -static-libgcc  -o 
build/genflags \
build/genflags.o build/rtl.o build/read-rtl.o build/ggc-none.o build/vec.o 
build/min-insn-modes.o build/gensupport.o build/print-rtl.o build/hash-table.o 
build/sort.o build/read-md.o build/errors.o 
../build-x86_64-pc-linux-gnu/libiberty/libiberty.a
/var/lib/laminar/run/gcc-local/82/local-toolchain-install/bin/g++ -std=c++11 -c 
  -g -O2   -DIN_GCC-fno-exceptions -fno-rtti -fasynchronous-unwind-tables 
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute 
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  
-DHAVE_CONFIG_H  -DGENERATOR_FILE -I. -Ibuild -I../../gcc/gcc 
-I../../gcc/gcc/build -I../../gcc/gcc/../include  
-I../../gcc/gcc/../libcpp/include  \
 -o build/genconditions.o ../../gcc/gcc/genconditions.cc
/var/lib/laminar/run/gcc-local/82/local-toolchain-install/bin/g++ -std=c++11   
-g -O2   -DIN_GCC-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W 
-Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute 
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  
-DHAVE_CONFIG_H  -DGENERATOR_FILE -static-libstdc++ -static-libgcc  -o 
build/genconditions \
build/genconditions.o build/rtl.o build/read-rtl.o build/ggc-none.o 
build/vec.o build/min-insn-modes.o build/gensupport.o build/print-rtl.o 
build/hash-table.o build/sort.o build/read-md.o build/errors.o 
../build-x86_64-pc-linux-gnu/libiberty/libiberty.a
build/genconditions ../../gcc/gcc/common.md ../../gcc/gcc/config/i386/i386.md > 
tmp-condmd.cc
/bin/bash ../../gcc/gcc/../move-if-change tmp-condmd.cc build/gencondmd.cc
echo timestamp > s-conditions
build/genpreds -c ../../gcc/gcc/common.md ../../gcc/gcc/config/i386/i386.md > 
tmp-constrs.h
/bin/bash ../../gcc/gcc/../move-if-change tmp-constrs.h tm-constrs.h
echo timestamp > s-constrs-h
/var/lib/laminar/run/gcc-local/82/local-toolchain-install/bin/g++ -std=c++11 -c 
  -g -O2   -DIN_GCC-fno-exceptions -fno-rtti -fasynchronous-unwind-tables 
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute 
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  
-DHAVE_CONFIG_H  -DGENERATOR_FILE -I. -Ibuild -I../../gcc/gcc 
-I../../gcc/gcc/build -I../../gcc/gcc/../include  
-I../../gcc/gcc/../libcpp/include  \
 -o 

Re: [PATCH v4 4/9] MIPS: Add bitwise instructions for mips16e2

2023-07-07 Thread Jan-Benedict Glaw
On Fri, 2023-07-07 16:38:51 +0800, 梅杰  wrote:
> 在 2023/7/7 07:06, Jan-Benedict Glaw 写道:
> > On Mon, 2023-06-19 16:29:53 +0800, Jie Mei  
> > wrote:
> > > There are shortened bitwise instructions in the mips16e2 ASE,
> > > for instance, ANDI, ORI/XORI, EXT, INS etc. .
[...]
> > Starting with this patch, I see some new warning:
> > 
> > [all 2023-07-06 23:04:01] g++ -c   -g -O2   -DIN_GCC 
> > -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
> > -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
> > -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported 
> > -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
> > -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE -I. 
> > -Ibuild -I../../gcc/gcc -I../../gcc/gcc/build -I../../gcc/gcc/../include  
> > -I../../gcc/gcc/../libcpp/include  \
> > [all 2023-07-06 23:04:01]  -o build/gencondmd.o build/gencondmd.cc
> > [all 2023-07-06 23:04:02] ../../gcc/gcc/config/mips/mips-msa.md:435:26: 
> > warning: 'and' of mutually exclusive equal-tests is always 0
> > [all 2023-07-06 23:04:02]   435 |   DONE;
> > [all 2023-07-06 23:04:02] ../../gcc/gcc/config/mips/mips-msa.md:435:26: 
> > warning: 'and' of mutually exclusive equal-tests is always 0
> > [all 2023-07-06 23:04:03] ../../gcc/gcc/config/mips/mips.md:822:1: warning: 
> > 'and' of mutually exclusive equal-tests is always 0
> > [all 2023-07-06 23:04:03]   822 | ;; conditional-move-type condition is 
> > needed.
> > [all 2023-07-06 23:04:03]   | ^
> > [all 2023-07-06 23:04:03] g++   -g -O2   -DIN_GCC 
> > -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
> > -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
> > -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported 
> > -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
> > -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE 
> > -static-libstdc++ -static-libgcc  -o build/gencondmd \
> > [all 2023-07-06 23:04:03] build/gencondmd.o build/errors.o 
> > ../build-x86_64-pc-linux-gnu/libiberty/libiberty.a
> > [all 2023-07-06 23:04:03] build/gencondmd > tmp-cond.md
> > 
> > 
> > (Full build log available as eg. 
> > http://toolchain.lug-owl.de/laminar/jobs/gcc-mips-linux/76)
> 
> The warning you mentioned above seems gone if I change the condition 
> `ISA_HAS_MIPS16E2` to `TARGET_MIPS16 && ISA_HAS_MIPS16E2` in mips.md.
> 
> But it's weird because `ISA_HAS_MIPS16E2` actually contains `TARGET_MIPS16`.
> 
> diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
> index b9eb541cf4a..77165778067 100644
> --- a/gcc/config/mips/mips.md
> +++ b/gcc/config/mips/mips.md
> @@ -3436,7 +3436,7 @@
>[(set (match_operand:GPR 0 "register_operand" "=d,d")
> (ior:GPR (match_operand:GPR 1 "register_operand" "%0,0")
>  (match_operand:GPR 2 "uns_arith_operand" "d,K")))]
> -  "ISA_HAS_MIPS16E2"
> +  "TARGET_MIPS16 && ISA_HAS_MIPS16E2"
>"@
> or\t%0,%2
> ori\t%0,%x2"

That's odd. Have you looked at preprocessed output? Maybe some
parentheses aren't as expected? Looks like an opportunity to deep-dive
into the unexpected. OTOH what's with the mips-msa.md warnings? The
pattern actually want !TARGET_MIPS16. (But I haven't really looked
into the dependencies.)

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH v4 4/9] MIPS: Add bitwise instructions for mips16e2

2023-07-06 Thread Jan-Benedict Glaw
Hi!

On Mon, 2023-06-19 16:29:53 +0800, Jie Mei  wrote:
> There are shortened bitwise instructions in the mips16e2 ASE,
> for instance, ANDI, ORI/XORI, EXT, INS etc. .
> 
> This patch adds these instrutions with corresponding tests.

[...]

Starting with this patch, I see some new warning:

[all 2023-07-06 23:04:01] g++ -c   -g -O2   -DIN_GCC 
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Wconditionally-supported 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE -I. 
-Ibuild -I../../gcc/gcc -I../../gcc/gcc/build -I../../gcc/gcc/../include  
-I../../gcc/gcc/../libcpp/include  \
[all 2023-07-06 23:04:01]  -o build/gencondmd.o build/gencondmd.cc
[all 2023-07-06 23:04:02] ../../gcc/gcc/config/mips/mips-msa.md:435:26: 
warning: 'and' of mutually exclusive equal-tests is always 0
[all 2023-07-06 23:04:02]   435 |   DONE;
[all 2023-07-06 23:04:02] ../../gcc/gcc/config/mips/mips-msa.md:435:26: 
warning: 'and' of mutually exclusive equal-tests is always 0
[all 2023-07-06 23:04:03] ../../gcc/gcc/config/mips/mips.md:822:1: warning: 
'and' of mutually exclusive equal-tests is always 0
[all 2023-07-06 23:04:03]   822 | ;; conditional-move-type condition is needed.
[all 2023-07-06 23:04:03]   | ^
[all 2023-07-06 23:04:03] g++   -g -O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute 
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  
-DGENERATOR_FILE -static-libstdc++ -static-libgcc  -o build/gencondmd \
[all 2023-07-06 23:04:03] build/gencondmd.o build/errors.o 
../build-x86_64-pc-linux-gnu/libiberty/libiberty.a
[all 2023-07-06 23:04:03] build/gencondmd > tmp-cond.md


(Full build log available as eg. 
http://toolchain.lug-owl.de/laminar/jobs/gcc-mips-linux/76)

Thanks, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Move substitute_and_fold over to use simple_dce_from_worklist

2023-06-26 Thread Jan-Benedict Glaw
Hi Andrew,

On Mon, 2023-06-26 09:13:51 -0700, Andrew Pinski  wrote:
> On Sun, Jun 25, 2023 at 10:59 PM Jan-Benedict Glaw  wrote:
> > On Fri, 2023-05-05 08:17:19 -0700, Andrew Pinski via Gcc-patches 
> >  wrote:
> > > While looking into a different issue, I noticed that it
> > > would take until the second forwprop pass to do some
> > > forward proping and it was because the ssa name was
> > > used more than once but the second statement was
> > > "dead" and we don't remove that until much later.
> > [...]
> > > OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
> >
> > Since this patch, I see a bit of fallout building the Linux kernel
> > using the adder875_defconfig:
> >
> > # CC  arch/powerpc/kernel/ptrace/ptrace-view.o
[...]
> Can you file a bug (https://gcc.gnu.org/bugzilla/) with the
> preprocessed source (which -freport-bug will provide). In the meantime
> I will try to reproduce it and see what is going on.

Here it is:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110420

Once again an asm goto.

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Move substitute_and_fold over to use simple_dce_from_worklist

2023-06-25 Thread Jan-Benedict Glaw
Hi Andrew,

On Fri, 2023-05-05 08:17:19 -0700, Andrew Pinski via Gcc-patches 
 wrote:
> While looking into a different issue, I noticed that it
> would take until the second forwprop pass to do some
> forward proping and it was because the ssa name was
> used more than once but the second statement was
> "dead" and we don't remove that until much later.
[...]
> OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

Since this patch, I see a bit of fallout building the Linux kernel
using the adder875_defconfig:

# CC  arch/powerpc/kernel/ptrace/ptrace-view.o
  powerpc-linux-gcc -Wp,-MMD,arch/powerpc/kernel/ptrace/.ptrace-view.o.d 
-nostdinc -I./arch/powerpc/include -I./arch/powerpc/include/generated  
-I./include -I./arch/powerpc/include/uapi 
-I./arch/powerpc/include/generated/uapi -I./include/uapi 
-I./include/generated/uapi -include ./include/linux/compiler-version.h -include 
./include/linux/kconfig.h -include ./include/linux/compiler_types.h 
-D__KERNEL__ -I ./arch/powerpc -fmacro-prefix-map=./= -Wall -Wundef 
-Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common 
-fshort-wchar -fno-PIE -Werror=implicit-function-declaration 
-Werror=implicit-int -Werror=return-type -Wno-format-security -funsigned-char 
-std=gnu11 -mbig-endian -m32 -msoft-float -pipe -ffixed-r2 -mmultiple 
-mno-readonly-in-sdata -mcpu=860 -mno-prefixed -mno-pcrel -mno-altivec -mno-vsx 
-mno-mma -fno-asynchronous-unwind-tables -mno-string -mbig-endian 
-mstack-protector-guard=tls -mstack-protector-guard-reg=r2 
-fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation 
-Wno-format-overflow -Wno-address-of-packed-member -O2 
-fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong 
-Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable 
-Wno-dangling-pointer -fomit-frame-pointer -ftrivial-auto-var-init=zero 
-fno-stack-clash-protection -Wdeclaration-after-statement -Wvla 
-Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation 
-Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds 
-Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow 
-fno-stack-check -fconserve-stack -Werror=date-time 
-Werror=incompatible-pointer-types -Werror=designated-init 
-Wno-packed-not-aligned -g -mstack-protector-guard-offset=544 -Werror 
-DUTS_MACHINE='"ppc"'
-DKBUILD_MODFILE='"arch/powerpc/kernel/ptrace/ptrace-view"' 
-DKBUILD_BASENAME='"ptrace_view"' -DKBUILD_MODNAME='"ptrace_view"' 
-D__KBUILD_MODNAME=kmod_ptrace_view -c -o 
arch/powerpc/kernel/ptrace/ptrace-view.o 
arch/powerpc/kernel/ptrace/ptrace-view.c  
during GIMPLE pass: pre
arch/powerpc/kernel/ptrace/ptrace-view.c: In function 'gpr32_set_common':
arch/powerpc/kernel/ptrace/ptrace-view.c:649:5: internal compiler error: in 
gimple_redirect_edge_and_branch, at tree-cfg.cc:6262
  649 | int gpr32_set_common(struct task_struct *target,
  | ^~~~
0x1a562a6 internal_error(char const*, ...)
 ???:0
0x826ea1 fancy_abort(char const*, int, char const*)
 ???:0
0x9b77c9 redirect_edge_and_branch(edge_def*, basic_block_def*)
 ???:0
0x9b7e43 split_edge(edge_def*)
 ???:0
0xee1cc7 split_critical_edges(bool)
 ???:0
Please submit a full bug report, with preprocessed source (by using 
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
make[4]: *** [scripts/Makefile.build:252: 
arch/powerpc/kernel/ptrace/ptrace-view.o] Error 1
make[3]: *** [scripts/Makefile.build:494: arch/powerpc/kernel/ptrace] Error 2
make[2]: *** [scripts/Makefile.build:494: arch/powerpc/kernel] Error 2
make[1]: *** [scripts/Makefile.build:494: arch/powerpc] Error 2
make: *** [Makefile:2026: .] Error 2


(Full log at 
http://toolchain.lug-owl.de/laminar/jobs/linux-powerpc-adder875_defconfig/100)

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


GCC nvptx: Silence warning?

2023-06-23 Thread Jan-Benedict Glaw
Hi Tom!

Building with newer GCC versions (I'm doing CI builds with -Werror),
we might see warnings like this:

/usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2   -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Wconditionally-supported 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. 
-I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include  
-I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody  
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd 
-I../libdecnumber -I../../gcc/gcc/../libbacktrace   -o nvptx.o -MT nvptx.o -MMD 
-MP -MF ./.deps/nvptx.TPo ../../gcc/gcc/config/nvptx/nvptx.cc
../../gcc/gcc/config/nvptx/nvptx.cc: In function 'void 
handle_ptx_version_option()':
../../gcc/gcc/config/nvptx/nvptx.cc:325:12: error: unquoted identifier or 
keyword 'sm_' in format [-Werror=format-diag]
  325 | error ("PTX version (%<-mptx%>) needs to be at least %s to support 
selected"
  |
^
  326 |" %<-misa%> (sm_%s)", ptx_version_to_string (first),
  |
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:2456: nvptx.o] Error 1


This is because the '_' triggers a generic heuristic that this is
probably something special. As I read the message, the `sm_*` ISA
descriptor belongs to `-misa`, so maybe just reposition the
quotation marks?


gcc/ChangeLog:
* config/nvptx/nvptx.cc (handle_ptx_version_option):
Reposition quotation marks around option with argument.



diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc
index 49cc6814178..ffe6a438265 100644
--- a/gcc/config/nvptx/nvptx.cc
+++ b/gcc/config/nvptx/nvptx.cc
@@ -323,7 +323,7 @@ handle_ptx_version_option (void)
 
   if (ptx_version_option < first)
 error ("PTX version (%<-mptx%>) needs to be at least %s to support 
selected"
-  " %<-misa%> (sm_%s)", ptx_version_to_string (first),
+  " %<-misa sm_%s%>", ptx_version_to_string (first),
   sm_version_to_string ((enum ptx_isa)ptx_isa_option));
 }
 


Ok for trunk?

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [COMMITTED] ada: Remove the body of System.Storage_Elements

2023-05-30 Thread Jan-Benedict Glaw
On Tue, 2023-05-30 09:05:43 +0100, Maciej W. Rozycki  wrote:
[Ada as a cross-compiler fails to build with a slightly-older compiler.]

>  Alternatively you can just bootstrap GCC under test natively first and 
> then use the newly-built compiler for all the cross builds you want to 
> verify.  As you need to do it only once per iteration the extra time spent 
> on the native build shouldn't be a big fraction of the duration of the 
> whole iteration.  A drawback is if this native bootstrap fails for any 
> reason, it will make the whole run invalid, i.e. none of the cross targets 
> will be verified.

Just implemented that: Extract the most recent GCC that got no
`--target` given and try to use that. On a higher level, that GCC is
built first, delaying the rest of the builds some hours.

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [COMMITTED] ada: Remove the body of System.Storage_Elements

2023-05-29 Thread Jan-Benedict Glaw
On Mon, 2023-05-29 16:11:26 +0200, Marc Poulhiès  wrote:
> Jan-Benedict Glaw  writes:
> > (A full build log is at
> > http://toolchain.lug-owl.de/laminar/jobs/gcc-aarch64-linux/74)
> >
> > Is this an issue with the patch? Or does it need a newer Ada compiler
> > to for building it?
> 
> Hello Jan,
> 
> IIUC, your base compiler is "g++ (Debian 20230315-1) 13.0.1 20230315".
> 
> It looks like you are doing a native build with bootstrap. If that's the
> case it should work correctly.
> 
> Can you elaborate how you build GCC?

My host compileris Debian's "gcc-snapshot", by now some two months
old. (As Eric wrote, it's probably just too old.) That compiler is
given for CC/CXX. The new build is just (as I wrote in the initial
mail) the configure/make call. So I'll just wait for the next drop for
Debian's "gcc-snapshot" package. I see that there are already a good
number of additional commits on the package source, I guess a new
package version is imminent.

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [COMMITTED] ada: Remove the body of System.Storage_Elements

2023-05-29 Thread Jan-Benedict Glaw
Hi Eric!

On Tue, 2023-05-23 10:08:26 +0200, Marc Poulhiès via Gcc-patches 
 wrote:
> From: Eric Botcazou 
> 
> All the subprograms declared in the unit have convention Intrinsic and
> their current implementation makes some implicit assumptions that are
> not valid universally, so it is replaced by a direct expansion.
> 
> This is mostly straightforward because Resolve_Intrinsic_Operator already
> contains the required circuitry, but a few adjustements are necessary.

Starting with this commit, my CI builder cannt build GCC:

../gcc/configure '--with-pkgversion=basepoints/gcc-14-1314-gff313e1c74b, built 
at 1685339868' 
--prefix=/var/lib/laminar/run/gcc-aarch64-linux/74/toolchain-install 
--enable-werror-always --enable-languages=all --disable-gcov --disable-shared 
--disable-threads --target=aarch64-linux --without-headers

make V=1 all-gcc
[...]
mkdir -p ada/
/usr/lib/gcc-snapshot/bin/gcc -c -g -O2-gnatpg -gnata -W -Wall -nostdinc 
-I- -I. -Iada/generated -Iada -I../../gcc/gcc/ada -Iada/libgnat 
-I../../gcc/gcc/ada/libgnat -Iada/gcc-interface 
-I../../gcc/gcc/ada/gcc-interface ../../gcc/gcc/ada/spark_xrefs.adb -o 
ada/spark_xrefs.o
s-stoele.ads:84:13: error: unrecognized intrinsic subprogram
make[1]: *** [../../gcc/gcc/ada/gcc-interface/Make-lang.in:165: 
ada/spark_xrefs.o] Error 1
make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-aarch64-linux/74/toolchain-build/gcc'
make: *** [Makefile:4637: all-gcc] Error 2

(A full build log is at
http://toolchain.lug-owl.de/laminar/jobs/gcc-aarch64-linux/74)

Is this an issue with the patch? Or does it need a newer Ada compiler
to for building it?

MfG, JBG

-- 


signature.asc
Description: PGP signature


[patch] mcore: Fix sprintf length warning

2023-05-22 Thread Jan-Benedict Glaw
Hi!

One of the supplied argument strings is unneccesarily long (c-sky, using
basically the same code, fixed it to a shorter length) and this fixes overflow
warnings, as GCC fails to deduce that the full 256 bytes for load_op[] are
not used at all.


make[1]: Entering directory 
'/var/lib/laminar/run/gcc-mcore-elf/38/toolchain-build/gcc'
[...]
/usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2   -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Wconditionally-supported 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. 
-I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include  
-I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody  
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd 
-I../libdecnumber -I../../gcc/gcc/../libbacktrace   -o mcore.o -MT mcore.o -MMD 
-MP -MF ./.deps/mcore.TPo ../../gcc/gcc/config/mcore/mcore.cc
../../gcc/gcc/config/mcore/mcore.cc: In function 'const char* 
output_inline_const(machine_mode, rtx_def**)':
../../gcc/gcc/config/mcore/mcore.cc:1264:24: error: '
ixw ' directive writing 6 bytes into a region of size between 1 and 
256 [-Werror=format-overflow=]
 1264 |   sprintf (buf, "%s\n\tixw\t%s,%s\t// %ld 0x%lx", load_op, dst_fmt, 
dst_fmt, value, value);
  |^
../../gcc/gcc/config/mcore/mcore.cc:1264:21: note: using the range [0, 
18446744073709551615] for directive argument
 1264 |   sprintf (buf, "%s\n\tixw\t%s,%s\t// %ld 0x%lx", load_op, dst_fmt, 
dst_fmt, value, value);
  | ^~~~
../../gcc/gcc/config/mcore/mcore.cc:1264:15: note: 'sprintf' output between 21 
and 310 bytes into a destination of size 256
 1264 |   sprintf (buf, "%s\n\tixw\t%s,%s\t// %ld 0x%lx", load_op, dst_fmt, 
dst_fmt, value, value);
  |   
^~~~
../../gcc/gcc/config/mcore/mcore.cc:1261:24: error: '
ixh ' directive writing 6 bytes into a region of size between 1 and 
256 [-Werror=format-overflow=]
 1261 |   sprintf (buf, "%s\n\tixh\t%s,%s\t// %ld 0x%lx", load_op, dst_fmt, 
dst_fmt, value, value);
  |^
../../gcc/gcc/config/mcore/mcore.cc:1261:21: note: using the range [0, 
18446744073709551615] for directive argument
 1261 |   sprintf (buf, "%s\n\tixh\t%s,%s\t// %ld 0x%lx", load_op, dst_fmt, 
dst_fmt, value, value);
  | ^~~~
../../gcc/gcc/config/mcore/mcore.cc:1261:15: note: 'sprintf' output between 21 
and 310 bytes into a destination of size 256
 1261 |   sprintf (buf, "%s\n\tixh\t%s,%s\t// %ld 0x%lx", load_op, dst_fmt, 
dst_fmt, value, value);
  |   
^~~~
../../gcc/gcc/config/mcore/mcore.cc:1258:24: error: '
lsli' directive writing 7 bytes into a region of size between 1 and 
256 [-Werror=format-overflow=]
 1258 |   sprintf (buf, "%s\n\tlsli\t%s,%%2\t// %ld 0x%lx", load_op, 
dst_fmt, value, value);
  |^~
../../gcc/gcc/config/mcore/mcore.cc:1258:21: note: using the range [0, 
18446744073709551615] for directive argument
 1258 |   sprintf (buf, "%s\n\tlsli\t%s,%%2\t// %ld 0x%lx", load_op, 
dst_fmt, value, value);
  | ^~
../../gcc/gcc/config/mcore/mcore.cc:1258:15: note: 'sprintf' output between 22 
and 311 bytes into a destination of size 256
 1258 |   sprintf (buf, "%s\n\tlsli\t%s,%%2\t// %ld 0x%lx", load_op, 
dst_fmt, value, value);
  |   
^
../../gcc/gcc/config/mcore/mcore.cc:1255:24: error: '
rotli   ' directive writing 8 bytes into a region of size between 1 and 
256 [-Werror=format-overflow=]
 1255 |   sprintf (buf, "%s\n\trotli\t%s,%%2\t// %ld 0x%lx", load_op, 
dst_fmt, value, value);
  |^~~
../../gcc/gcc/config/mcore/mcore.cc:1255:21: note: using the range [0, 
18446744073709551615] for directive argument
 1255 |   sprintf (buf, "%s\n\trotli\t%s,%%2\t// %ld 0x%lx", load_op, 
dst_fmt, value, value);
  | ^~~
../../gcc/gcc/config/mcore/mcore.cc:1255:15: note: 'sprintf' output between 23 
and 312 bytes into a destination of size 256
 1255 |   sprintf (buf, "%s\n\trotli\t%s,%%2\t// %ld 0x%lx", load_op, 
dst_fmt, value, value);
  |   
^~
../../gcc/gcc/config/mcore/mcore.cc:1252:24: error: '
bclri   ' directive writing 8 bytes into a region of size between 1 and 

Re: [PATCH] add glibc-stdint.h to vax and lm32 linux target (PR target/105525)

2023-05-22 Thread Jan-Benedict Glaw
Hi Mikael!

On Mon, 2023-05-22 17:25:39 +0200, Mikael Pettersson  
wrote:
> On Mon, May 22, 2023 at 3:57 PM Jan-Benedict Glaw  wrote:
> > On Mon, 2023-05-22 14:10:48 +0100, Maciej W. Rozycki  
> > wrote:
> > > On Fri, 19 May 2023, Mikael Pettersson wrote:
> > > > The background is that I maintain a script to build GCC-based crosses to
> > > > as many targets as I can, currently it supports 78 distinct processors 
> > > > and
> > > > 82 triplets (four processors have multiple triplets). I only check that 
> > > > I can
> > > > build the toolchains (full linux-gnu ones where possible).
> > >
> > >  Great work, thanks!
> >
> > I'd be very much interested in running your script as one build
> > variant for my http://toolchain.lug-owl.de/ efforts. Is it available
> > somewhere? That would be nice!
> 
> The script is publicly available as https://github.com/mikpe/buildcross.git.
> Usage for actively maintained toolchains is pretty easy. For example, to build
> a cross to sparc64-unknown-linux-gnu you just run
> 
> buildcross -jN sparc64
> 
> and it will leave the toolchain in cross-sparc64. (Other bits will
> land in downloads/,
> sources/, and host-tools/.)

Thanks, I'll have a look!

> If you're only interested in linux-gnu toolchains for actively
> maintained targets there's
> a build-many-glibcs.py script in glibc that should be a better fit.

My intention is to gain access to as many targets and different
configurations and build strategies as possible. glibc's script is
already included. (As I build with all languages, most of the target
configurations fail right now.)

Thanks!

Jan-Benedict
-- 


signature.asc
Description: PGP signature


Re: [PATCH] add glibc-stdint.h to vax and lm32 linux target (PR target/105525)

2023-05-22 Thread Jan-Benedict Glaw
Hi!

On Mon, 2023-05-22 14:10:48 +0100, Maciej W. Rozycki  wrote:
> On Fri, 19 May 2023, Mikael Pettersson wrote:
> > The background is that I maintain a script to build GCC-based crosses to
> > as many targets as I can, currently it supports 78 distinct processors and
> > 82 triplets (four processors have multiple triplets). I only check that I 
> > can
> > build the toolchains (full linux-gnu ones where possible).
> 
>  Great work, thanks!

I'd be very much interested in running your script as one build
variant for my http://toolchain.lug-owl.de/ efforts. Is it available
somewhere? That would be nice!

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: Rust: In 'type_for_mode' langhook also consider all 'int_n' modes/types (was: Modula-2 / Rust: Many targets failing)

2023-02-25 Thread Jan-Benedict Glaw
Hi Thomas,

On Wed, 2023-02-22 12:25:01 +0100, Thomas Schwinge  
wrote:
> On 2022-12-19T22:23:45+0100, Jan-Benedict Glaw  wrote:
> >  Rust related issues
> > =
> >
> >  --target=msp430-elfbare
> > ~
> >   /var/lib/laminar/run/gcc-msp430-elfbare/24/toolchain-build/./gcc/xgcc 
> > -B/var/lib/laminar/run/gcc-msp430-elfbare/24/toolchain-build/./gcc/  -xrust 
> > -frust-incomplete-and-experimental-compiler-do-not-use -nostdinc /dev/null 
> > -S -o /dev/null -fself-test=../../gcc/gcc/testsuite/selftests
> >   : internal compiler error: Segmentation fault
> >   0xf2efbf crash_signal
> > ../../gcc/gcc/toplev.cc:314
> >   0x120c8c7 build_function_type(tree_node*, tree_node*, bool)
> > ../../gcc/gcc/tree.cc:7360
> >   0x120cc20 build_function_type_list(tree_node*, ...)
> > ../../gcc/gcc/tree.cc:7442
> >   0x120d16b build_common_builtin_nodes()
> > ../../gcc/gcc/tree.cc:9883
> >   0x8449b4 grs_langhook_init
> > ../../gcc/gcc/rust/rust-lang.cc:132
> >   0x8427b2 lang_dependent_init
> > ../../gcc/gcc/toplev.cc:1815
> >   0x8427b2 do_compile
> > ../../gcc/gcc/toplev.cc:2110
> >   Please submit a full bug report, with preprocessed source (by using 
> > -freport-bug).
> >   Please include the complete backtrace with any bug report.
> >   See <https://gcc.gnu.org/bugs/> for instructions.
> >   make[1]: *** [../../gcc/gcc/rust/Make-lang.in:275: s-selftest-rust] 
> > Error 1
> 
> See also <https://github.com/Rust-GCC/gccrs/issues/1713>
> "Test failure on msp430-elfbare target".

Confirm: fixed upstream
(http://toolchain.lug-owl.de/laminar/jobs/gcc-msp430-elf/65)

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: Rust: In 'type_for_mode' langhook also consider all 'int_n' modes/types (was: Modula-2 / Rust: Many targets failing)

2023-02-24 Thread Jan-Benedict Glaw
Hi Thomas / Arthur!

On Wed, 2023-02-22 15:30:37 +0100, Arthur Cohen  
wrote:
[..]
> > >   --target=msp430-elfbare
> > > ~
> > >
> > > /var/lib/laminar/run/gcc-msp430-elfbare/24/toolchain-build/./gcc/xgcc 
> > > -B/var/lib/laminar/run/gcc-msp430-elfbare/24/toolchain-build/./gcc/  
> > > -xrust -frust-incomplete-and-experimental-compiler-do-not-use -nostdinc 
> > > /dev/null -S -o /dev/null -fself-test=../../gcc/gcc/testsuite/selftests
> > >: internal compiler error: Segmentation fault
> > >0xf2efbf crash_signal
> > >  ../../gcc/gcc/toplev.cc:314
> > >0x120c8c7 build_function_type(tree_node*, tree_node*, bool)
> > >  ../../gcc/gcc/tree.cc:7360
> > >0x120cc20 build_function_type_list(tree_node*, ...)
> > >  ../../gcc/gcc/tree.cc:7442
> > >0x120d16b build_common_builtin_nodes()
> > >  ../../gcc/gcc/tree.cc:9883
> > >0x8449b4 grs_langhook_init
> > >  ../../gcc/gcc/rust/rust-lang.cc:132
> > >0x8427b2 lang_dependent_init
> > >  ../../gcc/gcc/toplev.cc:1815
> > >0x8427b2 do_compile
> > >  ../../gcc/gcc/toplev.cc:2110
> > >Please submit a full bug report, with preprocessed source (by 
> > > using -freport-bug).
> > >Please include the complete backtrace with any bug report.
> > >See  for instructions.
> > >make[1]: *** [../../gcc/gcc/rust/Make-lang.in:275: 
> > > s-selftest-rust] Error 1

Confirmed successful build #37 for my msp320-elfbare build at
http://toolchain.lug-owl.de/laminar/jobs/gcc-msp430-elfbare

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


[patch] bpf: Fix double whitespace warning

2023-02-15 Thread Jan-Benedict Glaw
Hi!

Since a recent commit, the BPF target produces a new warning due to
two consecutive non-quoted spaces in a message. This'll fix it:

gcc/
* config/bpf/bpf.cc (bpf_option_override): Fix doubled space.


Ok?

MfG, JBG


diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc
index b268801d00c..d8693f8cfbe 100644
--- a/gcc/config/bpf/bpf.cc
+++ b/gcc/config/bpf/bpf.cc
@@ -258,7 +258,7 @@ bpf_option_override (void)
 {
   inform (input_location,
   "%<-fstack-protector%> does not work "
-  " on this architecture");
+ "on this architecture");
   flag_stack_protect = 0;
 }
 }
-- 


signature.asc
Description: PGP signature


Re: [PATCH] Add support for x86_64-*-gnu-* targets to build x86_64 gnumach/hurd

2023-02-01 Thread Jan-Benedict Glaw
Hi Flávio and Thomas!

On Mon, 2023-01-30 16:44:29 +0100, Thomas Schwinge  
wrote:
> On 2023-01-27T21:15:01-0500, Flávio Cruz  wrote:
> > Not sure what happened, but here's the patch as an attachment. Thanks for
> > your patience.
> 
> Thanks, that worked.  Without any changes now pushed to master branch in
> commit 5f8950b403f6351f125d8281d2e7430a43e7d125
> "Add support for x86_64-*-gnu-* targets to build x86_64 gnumach/hurd",
> see attached.
> 
> I'll watch how x86_64 GNU/Hurd develops!  :-)

Please also add this target configuration to contrib/config-list.mk

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [COMMITTED] bpf: disable -fstack-protector in BPF

2023-01-28 Thread Jan-Benedict Glaw
On Tue, 2023-01-17 17:25:08 +0100, Jose E. Marchesi via Gcc-patches 
 wrote:
> The stack protector is not supported in BPF.  This patch disables
> -fstack-protector in bpf-* targets, along with the emission of a note
> indicating that the feature is not supported in this platform.
[...]
> diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc
> index 576a1fe8eab..b268801d00c 100644
> --- a/gcc/config/bpf/bpf.cc
> +++ b/gcc/config/bpf/bpf.cc
> @@ -253,6 +253,14 @@ bpf_option_override (void)
>if (bpf_has_jmp32 == -1)
>  bpf_has_jmp32 = (bpf_isa >= ISA_V3);
>  
> +  /* Disable -fstack-protector as it is not supported in BPF.  */
> +  if (flag_stack_protect)
> +{
> +  inform (input_location,
> +  "%<-fstack-protector%> does not work "
> +  " on this architecture");
> +  flag_stack_protect = 0;
> +}

Building with a recent GCC with (noticed during a -Werror build), this
results in a new warning:

[all 2023-01-27 16:26:25] ../../gcc/gcc/config/bpf/bpf.cc: In function 'void 
bpf_option_override()':
[all 2023-01-27 16:26:25] ../../gcc/gcc/config/bpf/bpf.cc:260:51: error: 
unquoted sequence of 2 consecutive space characters in format 
[-Werror=format-diag]
[all 2023-01-27 16:26:25]   260 |   "%<-fstack-protector%> does not 
work "
[all 2023-01-27 16:26:25]   |   
^~
[all 2023-01-27 16:26:25]   261 |   " on this architecture");
[all 2023-01-27 16:26:25]   |   ~~  
 
[all 2023-01-27 16:26:27] cc1plus: all warnings being treated as errors

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH 5/8 v2] middle-end: Add cltz_complement idiom recognition

2023-01-19 Thread Jan-Benedict Glaw
On Thu, 2022-12-22 17:42:16 +, Andrew Carlotti via Gcc-patches 
 wrote:
> New patch below, bootstrapped and regression tested on
> aarch64-unknown-linux-gnu and x86_64-pc-linux-gnu - ok to merge?

> diff --git a/gcc/tree-ssa-loop-niter.cc b/gcc/tree-ssa-loop-niter.cc
> index 
> fece876099c1687569d6351e7d2416ea6acae5b5..ce2441f2a6dbdf2d8fe42755d5d1abd8a631bb5c
>  100644
> --- a/gcc/tree-ssa-loop-niter.cc
> +++ b/gcc/tree-ssa-loop-niter.cc
> @@ -42,6 +42,7 @@ along with GCC; see the file COPYING3.  If not see
>  #include "tree-chrec.h"
>  #include "tree-scalar-evolution.h"
>  #include "tree-dfa.h"
> +#include "internal-fn.h"
>  #include "gimple-range.h"
>  
>  
> @@ -2198,6 +2199,224 @@ number_of_iterations_popcount (loop_p loop, edge exit,
>return true;
>  }
>  
> +/* Return an expression that counts the leading/trailing zeroes of src.
> +
> +   If define_at_zero is true, then the built expression will be defined to
> +   return the precision of src when src == 0 (using either a conditional
> +   expression or a suitable internal function).
> +   Otherwise, we can elide the conditional expression and let src = 0 invoke
> +   undefined behaviour.  */
> +
> +static tree
> +build_cltz_expr (tree src, bool leading, bool define_at_zero)
> +{
[...]
> +
> +  tree call;
> +  if (use_ifn)
> +{
> +  call = build_call_expr_internal_loc (UNKNOWN_LOCATION, ifn,
> +integer_type_node, 1, src);
> +  int val;
> +  scalar_int_mode mode = SCALAR_INT_TYPE_MODE (utype);
 

This will give us a new unused variable warning.

> +  int optab_defined_at_zero
> + = leading ? CLZ_DEFINED_VALUE_AT_ZERO (mode, val)
> +   : CTZ_DEFINED_VALUE_AT_ZERO (mode, val);
> +  if (define_at_zero && !(optab_defined_at_zero == 2 && val == prec))
> + {
> +   tree is_zero = fold_build2 (NE_EXPR, boolean_type_node, src,
> +   build_zero_cst (TREE_TYPE (src)));
> +   call = fold_build3(COND_EXPR, integer_type_node, is_zero, call,
> +  build_int_cst (integer_type_node, prec));
> + }
> +}

MfG, JBG

-- 


signature.asc
Description: PGP signature


Modula-2 / Rust: Many targets failing

2022-12-19 Thread Jan-Benedict Glaw
Hi!

With the recent merges for Modula-2 and Rust, I see a good number of
targets failing with --enable-languages=all, mostly due to issues with
the Modula-2 driver.


 Modula-2 related issues
=


 --target=x86_64-apple-darwin
~~
/bin/bash ../../gcc/gcc/m2/tools-src/makeSystem -fpim \
 ../../gcc/gcc/m2/gm2-libs/SYSTEM.def \
 ../../gcc/gcc/m2/gm2-libs/SYSTEM.mod \
 -I../../gcc/gcc/m2/gm2-libs \
 
"/var/lib/laminar/run/gcc-x86_64-apple-darwin/19/toolchain-build/./gcc/gm2 
-B/var/lib/laminar/run/gcc-x86_64-apple-darwin/19/toolchain-build/./gcc/ " 
/var/lib/laminar/run/gcc-x86_64-apple-darwin/19/toolchain-build/gcc/m2/gm2-libs/SYSTEM.def

/var/lib/laminar/run/gcc-x86_64-apple-darwin/19/toolchain-build/./gcc/as: 114: 
exec: -arch: not found
SYSTEM module creates type: LOC
SYSTEM module creates type: WORD
SYSTEM module creates type: BYTE
SYSTEM module creates type: ADDRESS
SYSTEM module creates type: INTEGER8
SYSTEM module creates type: INTEGER16
SYSTEM module creates type: INTEGER32
SYSTEM module creates type: INTEGER64
SYSTEM module creates type: CARDINAL8
SYSTEM module creates type: CARDINAL16
SYSTEM module creates type: CARDINAL32
SYSTEM module creates type: CARDINAL64
SYSTEM module creates type: WORD16
SYSTEM module creates type: WORD32
SYSTEM module creates type: WORD64
SYSTEM module creates type: BITSET8
SYSTEM module creates type: BITSET16
SYSTEM module creates type: BITSET32
SYSTEM module creates type: REAL32
SYSTEM module creates type: REAL64
SYSTEM module creates type: REAL128
SYSTEM module creates type: COMPLEX32
SYSTEM module creates type: COMPLEX64
SYSTEM module creates type: COMPLEX128
SYSTEM module creates type: CSIZE_T
SYSTEM module creates type: CSSIZE_T

/var/lib/laminar/run/gcc-x86_64-apple-darwin/19/toolchain-build/./gcc/as: 114: 
exec: -arch: not found
make[1]: *** [../../gcc/gcc/m2/Make-lang.in:1524: 
/var/lib/laminar/run/gcc-x86_64-apple-darwin/19/toolchain-build/gcc/m2/gm2-libs/SYSTEM.def]
 Error 1
rm m2/gm2-compiler-boot/P2Build.mod 
m2/gm2-compiler-boot/P0SyntaxCheck.mod m2/gm2-compiler-boot/PCBuild.mod 
m2/gm2-compiler-boot/PHBuild.mod m2/gm2-compiler-boot/P1Build.mod 
m2/gm2-compiler-boot/P3Build.mod
make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-x86_64-apple-darwin/19/toolchain-build/gcc'
make: *** [Makefile:4623: all-gcc] Error 2


 --target=sparc64-sun-solaris2.11 --with-gnu-ld --with-gnu-as 
--enable-threads=posix
~
Similar to x86_64-apple-darwin, but:

/var/lib/laminar/run/gcc-sparc64-sun-solaris2.11OPT-with-gnu-ldOPT-with-gnu-asOPT-enable-threads=posix/19/toolchain-install/sparc64-sun-solaris2.11/bin/as:
 unrecognized option '-m64'

 --target=sparc-sun-solaris2.11

Similar to x86_64-apple-darwin, but:

/var/lib/laminar/run/gcc-sparc-sun-solaris2.11/16/toolchain-install/sparc-sun-solaris2.11/bin/as:
 unrecognized option '-m32'

 --target=powerpc64-darwin
 --target=powerpc-darwin8
 --target=powerpc-darwin7
~~~
Similar to x86_64-apple-darwin

 --target=powerpc-lynxos
~
Same place, but
/var/lib/laminar/run/gcc-powerpc-lynxos/20/toolchain-build/./gcc/as: 
114: exec: -I: not found

 --target=mipsisa64sr71k-elf
~
Similar to the others:
/bin/bash ../../gcc/gcc/m2/tools-src/makeSystem -fpim \
 ../../gcc/gcc/m2/gm2-libs/SYSTEM.def \
 ../../gcc/gcc/m2/gm2-libs/SYSTEM.mod \
 -I../../gcc/gcc/m2/gm2-libs \
 
"/var/lib/laminar/run/gcc-mipsisa64sr71k-elf/23/toolchain-build/./gcc/gm2 
-B/var/lib/laminar/run/gcc-mipsisa64sr71k-elf/23/toolchain-build/./gcc/ " 
/var/lib/laminar/run/gcc-mipsisa64sr71k-elf/23/toolchain-build/gcc/m2/gm2-libs/SYSTEM.def
Assembler messages:
Error: bad value (sr71k) for default CPU
Internal error in mips_after_parse_args at config/tc-mips.c:15290.
Please report this bug.

 --target=m32rle-elf
~
/bin/bash ../../gcc/gcc/m2/tools-src/makeSystem -fpim \
 ../../gcc/gcc/m2/gm2-libs/SYSTEM.def \
 ../../gcc/gcc/m2/gm2-libs/SYSTEM.mod \
 -I../../gcc/gcc/m2/gm2-libs \
 
"/var/lib/laminar/run/gcc-m32rle-elf/21/toolchain-build/./gcc/gm2 
-B/var/lib/laminar/run/gcc-m32rle-elf/21/toolchain-build/./gcc/ " 
/var/lib/laminar/run/gcc-m32rle-elf/21/toolchain-build/gcc/m2/gm2-libs/SYSTEM.def

Re: [PATCH] tree-optimization/107852 - missed optimization with PHIs

2022-12-05 Thread Jan-Benedict Glaw
On Tue, 2022-11-29 14:30:22 +0100, Richard Biener via Gcc-patches 
 wrote:
> Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
> 
>   PR tree-optimization/107852
>   * tree-ssa-sccvn.cc (visit_phi): Use equivalences recorded
>   as predicated values to elide more redundant PHIs.
> 
>   * gcc.dg/tree-ssa/ssa-fre-101.c: New testcase.

This seems to trigger an issue when building the Linux powerpc kernel
for the skiroot_defconfig:

[mk all 2022-12-05 19:50:10]   powerpc64-linux-gcc 
-Wp,-MMD,drivers/dma-buf/.dma-fence-array.o.d -nostdinc 
-I./arch/powerpc/include -I./arch/powerpc/include/generated  -I./include 
-I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi 
-I./include/uapi -I./include/generated/uapi -include 
./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include 
./include/linux/compiler_types.h -D__KERNEL__ -I ./arch/powerpc 
-DHAVE_AS_ATHIGH=1 -fmacro-prefix-map=./= -Wall -Wundef 
-Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common 
-fshort-wchar -fno-PIE -Werror=implicit-function-declaration 
-Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu11 
-mlittle-endian -m64 -msoft-float -pipe -mtraceback=no -mabi=elfv2 
-mcmodel=medium -mno-pointers-to-nested-functions -mcpu=power8 -mtune=power10 
-mno-prefixed -mno-pcrel -mno-altivec -mno-vsx -mno-mma 
-fno-asynchronous-unwind-tables -mno-string -Wa,-maltivec -Wa,-mpower4 
-Wa,-many -mno-strict-align -mlittle-endian -mstack-protector-guard=tls 
-mstack-protector-guard-reg=r13 -fno-delete-null-pointer-checks 
-Wno-frame-address -Wno-format-truncation -Wno-format-overflow 
-Wno-address-of-packed-member -Os -fno-allow-store-data-races 
-Wframe-larger-than=2048 -fstack-protector-strong -Wno-main 
-Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer 
-fomit-frame-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection 
-Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type 
-Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict 
-Wno-maybe-uninitialized -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 
-fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time 
-Werror=incompatible-pointer-types -Werror=designated-init 
-Wno-packed-not-aligned -mstack-protector-guard-offset=2800
-DKBUILD_MODFILE='"drivers/dma-buf/dma-fence-array"' 
-DKBUILD_BASENAME='"dma_fence_array"' -DKBUILD_MODNAME='"dma_fence_array"' 
-D__KBUILD_MODNAME=kmod_dma_fence_array -c -o drivers/dma-buf/dma-fence-array.o 
drivers/dma-buf/dma-fence-array.c  
[mk all 2022-12-05 19:50:10] drivers/dma-buf/dma-fence-array.c: In function 
'dma_fence_array_create':
[mk all 2022-12-05 19:50:10] drivers/dma-buf/dma-fence-array.c:154:25: error: 
control flow in the middle of basic block 12
[mk all 2022-12-05 19:50:10]   154 | struct dma_fence_array 
*dma_fence_array_create(int num_fences,
[mk all 2022-12-05 19:50:10]   | 
^~
[mk all 2022-12-05 19:50:10] during GIMPLE pass: ivopts
[mk all 2022-12-05 19:50:10] drivers/dma-buf/dma-fence-array.c:154:25: internal 
compiler error: verify_flow_info failed
[mk all 2022-12-05 19:50:10] 0x19ea876 internal_error(char const*, ...)
[mk all 2022-12-05 19:50:10]???:0
[mk all 2022-12-05 19:50:10] 0x94b00e verify_flow_info()
[mk all 2022-12-05 19:50:10]???:0
[mk all 2022-12-05 19:50:10] Please submit a full bug report, with preprocessed 
source (by using -freport-bug).
[mk all 2022-12-05 19:50:10] Please include the complete backtrace with any bug 
report.
[mk all 2022-12-05 19:50:10] See  for instructions.

Maybe you've got an idea, otherwise I'll try to reproduce it manually.
(That's all automated building.)

Thanks,
  Jan-Benedict
-- 


signature.asc
Description: PGP signature


Re: [PATCH] range-op: Implement floating point division fold_range [PR107569]

2022-11-21 Thread Jan-Benedict Glaw
Hi Jakub,

On Fri, 2022-11-11 10:09:42 +0100, Jakub Jelinek via Gcc-patches 
 wrote:
> Here is the floating point division fold_range implementation,
> as I wrote in the last mail, we could outline some of the common parts
> into static methods with descriptive names and share them between
> foperator_div and foperator_mult.
[...]

I'm running a slightly hacked [glibc]/scripts/build-many-glibcs.py to
to CI builds for glibc as well by now (hacked to allow for GCC master
being used) and this GCC commit
(2d5c4a16dd833aa083f13dd3e78e3ef38afe6ebb) triggers glibc's
elf/check-localplt testcase to fail, though just for
sparc64-linux-gnu. (As I just started with glibc checks, it took me a
while to realize this was a real regression and not a flaw in my
setup.)

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH v3] xtensa: Prepare the transition from Reload to LRA

2022-10-25 Thread Jan-Benedict Glaw
Hi!

On Wed, 2022-10-19 17:16:24 +0900, Takayuki 'January June' Suwa via Gcc-patches 
 wrote:
>   * gcc/config/xtensa/xtensa.md: Add two new split patterns:
> - splits DImode immediate load into two SImode ones
> - puts out-of-constraint SImode constants into the constant pool

> --- a/gcc/config/xtensa/xtensa.md
> +++ b/gcc/config/xtensa/xtensa.md
> @@ -940,14 +940,9 @@
>because of offering further optimization opportunities.  */
>if (register_operand (operands[0], DImode))
>   {
> -   rtx lowpart, highpart;
> -
> -   if (TARGET_BIG_ENDIAN)
> - split_double (operands[1], , );
> -   else
> - split_double (operands[1], , );
> -   emit_insn (gen_movsi (gen_lowpart (SImode, operands[0]), lowpart));
> -   emit_insn (gen_movsi (gen_highpart (SImode, operands[0]), highpart));
> +   xtensa_split_DI_reg_imm (operands);
> +   emit_move_insn (operands[0], operands[1]);
> +   emit_move_insn (operands[2], operands[3]);

This results in a new warning for me:

[all 2022-10-25 16:04:19] g++  -fno-PIE -c   -g -O2   -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common 
 -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include 
-I../../gcc/gcc/../libcody  -I../../gcc/gcc/../libdecnumber 
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I../../gcc/gcc/../libbacktrace   -o insn-emit.o -MT insn-emit.o -MMD -MP -MF 
./.deps/insn-emit.TPo insn-emit.cc
[all 2022-10-25 16:04:22] ../../gcc/gcc/config/xtensa/xtensa.md: In function 
'rtx_def* gen_movdi(rtx, rtx)':
[all 2022-10-25 16:04:22] ../../gcc/gcc/config/xtensa/xtensa.md:945:26: error: 
array subscript 3 is above array bounds of 'rtx_def* [2]' [-Werror=array-bounds]
[all 2022-10-25 16:04:22]   945 |   emit_move_insn (operands[2], 
operands[3]);
[all 2022-10-25 16:04:22]   |   
~~~^~
[all 2022-10-25 16:04:22] ../../gcc/gcc/config/xtensa/xtensa.md:897:9: note: 
while referencing 'operands'
[all 2022-10-25 16:04:22]   897 |(set_attr "mode" "SF")
[all 2022-10-25 16:04:22]   | ^~~~
[all 2022-10-25 16:04:22] ../../gcc/gcc/config/xtensa/xtensa.md:945:26: error: 
array subscript 2 is above array bounds of 'rtx_def* [2]' [-Werror=array-bounds]
[all 2022-10-25 16:04:22]   945 |   emit_move_insn (operands[2], 
operands[3]);
[all 2022-10-25 16:04:22]   |   
~~~^~
[all 2022-10-25 16:04:22] ../../gcc/gcc/config/xtensa/xtensa.md:897:9: note: 
while referencing 'operands'
[all 2022-10-25 16:04:22]   897 |(set_attr "mode" "SF")
[all 2022-10-25 16:04:22]   | ^~~~

I didn't yet actually check the warning, it may be bogus.

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [committed] More infrastructure to avoid bogus RTL on H8

2022-10-25 Thread Jan-Benedict Glaw
Hi Jeff!

On Mon, 2022-10-17 17:47:16 -0600, Jeff Law via Gcc-patches 
 wrote:
> --- a/gcc/config/h8300/h8300.cc
> +++ b/gcc/config/h8300/h8300.cc
> @@ -5531,6 +5531,32 @@ h8300_ok_for_sibcall_p (tree fndecl, tree)
>  
>return 1;
>  }
> +
> +/* Return TRUE if OP is a PRE_INC or PRE_DEC
> +   instruction using REG, FALSE otherwise.  */
> +
> +bool
> +pre_incdec_with_reg (rtx op, int reg)
> +{
> +  /* OP must be a MEM.  */
> +  if (GET_CODE (op) != MEM)
> +return false;
> +
> +  /* The address must be a PRE_INC or PRE_DEC.  */
> +  op = XEXP (op, 0);
> +  if (GET_CODE (op) != PRE_DEC && GET_CODE (op) != PRE_INC)
> +return false;
> +
> +  /* It must be a register that is being incremented
> + or decremented.  */
> +  op = XEXP (op, 0);
> +  if (!REG_P (op))
> +return false;
> +
> +  /* Finally, check that the register number matches.  */
> +  return REGNO (op) == reg;

This results in a new signed-vs-unsigned warning for me:

[all 2022-10-25 00:41:11] ../../gcc/gcc/config/h8300/h8300.cc: In function 
'bool pre_incdec_with_reg(rtx, int)':
[all 2022-10-25 00:41:11] ../../gcc/gcc/config/h8300/h8300.cc:5557:21: error: 
comparison of integer expressions of different signedness: 'unsigned int' and 
'int' [-Werror=sign-compare]
[all 2022-10-25 00:41:11]  5557 |   return REGNO (op) == reg;

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


[ping] [PATCH] C-SKY: Fix unsigned comparison warning

2022-09-16 Thread Jan-Benedict Glaw
On Mon, 2022-09-12 14:19:23 +0200, Jan-Benedict Glaw  wrote:
> 2022-09-06  Jan-Benedict Glaw  
> 
> gcc/ChangeLog:
>   * config/csky/csky.h (FUNCTION_ARG_REGNO_P): Cast REGNO to (int)
>   to prevent warning.
> 
> diff --git a/gcc/config/csky/csky.h b/gcc/config/csky/csky.h
> index 37410f0cda4..730d1b44ef1 100644
> --- a/gcc/config/csky/csky.h
> +++ b/gcc/config/csky/csky.h
> @@ -418,7 +418,7 @@ typedef struct
> The int cast is to prevent a complaint about unsigned comparison to
> zero, since CSKY_FIRST_PARM_REGNUM is zero.  */
>  #define FUNCTION_ARG_REGNO_P(REGNO)  \
> -  (((REGNO) >= CSKY_FIRST_PARM_REGNUM\
> +  (((int)(REGNO) >= CSKY_FIRST_PARM_REGNUM   \
>  && (REGNO) < (CSKY_NPARM_REGS + CSKY_FIRST_PARM_REGNUM)) \
> || FUNCTION_VARG_REGNO_P(REGNO))
>  
> 
> Ok for HEAD?

Just wanted to give this a ping.

MfG, JBG

-- 


signature.asc
Description: PGP signature


[COMMITTED] Fix unused variable warning (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-09-14 Thread Jan-Benedict Glaw
On Thu, 2022-09-01 12:05:23 +0200, Martin Liška  wrote:
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> 
> I've also built all cross compilers.
> 
> Ready to be installed?
> Thanks,
> Martin
> 
> gcc/ChangeLog:
> 
>   * Makefile.in: Remove -gstabs option support, DBX-related
> macros and DBX debugging info support.
[...]
>   * config/mips/mips.cc (mips_output_filename): Likewise.
>   (mips_option_override): Likewise.
[...]
> diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
> index e81a245dcf4..47724950c3e 100644
> --- a/gcc/config/mips/mips.cc
> +++ b/gcc/config/mips/mips.cc
[...]
> @@ -20505,24 +20500,13 @@ mips_option_override (void)
>  
>for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
>  {
> -  mips_dbx_regno[i] = IGNORED_DWARF_REGNUM;
>if (GP_REG_P (i) || FP_REG_P (i) || ALL_COP_REG_P (i))
>   mips_dwarf_regno[i] = i;
>else
>   mips_dwarf_regno[i] = INVALID_REGNUM;
>  }
>  
> -  start = GP_DBX_FIRST - GP_REG_FIRST;
> -  for (i = GP_REG_FIRST; i <= GP_REG_LAST; i++)
> -mips_dbx_regno[i] = i + start;
> -
> -  start = FP_DBX_FIRST - FP_REG_FIRST;
> -  for (i = FP_REG_FIRST; i <= FP_REG_LAST; i++)
> -mips_dbx_regno[i] = i + start;
> -
>/* Accumulator debug registers use big-endian ordering.  */
> -  mips_dbx_regno[HI_REGNUM] = MD_DBX_FIRST + 0;
> -  mips_dbx_regno[LO_REGNUM] = MD_DBX_FIRST + 1;
>mips_dwarf_regno[HI_REGNUM] = MD_REG_FIRST + 0;
>mips_dwarf_regno[LO_REGNUM] = MD_REG_FIRST + 1;
>for (i = DSP_ACC_REG_FIRST; i <= DSP_ACC_REG_LAST; i += 2)

This leaves the `start` variable unused, resulting in a new warning.
Fixed (committed as obvious) by this:

/usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2   -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common 
 -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include 
-I../../gcc/gcc/../libcody  -I../../gcc/gcc/../libdecnumber 
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I../../gcc/gcc/../libbacktrace   -o mips.o -MT mips.o -MMD -MP -MF 
./.deps/mips.TPo ../../gcc/gcc/config/mips/mips.cc
../../gcc/gcc/config/mips/mips.cc: In function 'void mips_option_override()':
../../gcc/gcc/config/mips/mips.cc:20021:10: error: unused variable 'start' 
[-Werror=unused-variable]
20021 |   int i, start, regno, mode;
  |  ^

2022-09-14  Jan-Benedict Glaw  

gcc/
* config/mips/mips.cc (mips_option_override): Drop unused variable.

diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
index 47724950c3e..387376b3df8 100644
--- a/gcc/config/mips/mips.cc
+++ b/gcc/config/mips/mips.cc
@@ -20018,7 +20018,7 @@ mips_set_tune (const struct mips_cpu_info *info)
 static void
 mips_option_override (void)
 {
-  int i, start, regno, mode;
+  int i, regno, mode;
 
   if (OPTION_SET_P (mips_isa_option))
 mips_isa_option_info = _cpu_info_table[mips_isa_option];


Committed as obvious.

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Implement known/maybe fpclassify like API for frange.

2022-09-12 Thread Jan-Benedict Glaw
Hi Aldy!

On Mon, 2022-09-12 15:12:46 +0200, Aldy Hernandez  wrote:
> On Mon, Sep 12, 2022 at 10:48 AM Jan-Benedict Glaw  wrote:
> >
> > On Thu, 2022-09-08 12:56:24 +0200, Aldy Hernandez via Gcc-patches 
> >  wrote:
> >
> > > From 795baa0b044953e9f198f49e379374d633f43b47 Mon Sep 17 00:00:00 2001
> > > From: Aldy Hernandez 
> > > Date: Thu, 8 Sep 2022 08:11:43 +0200
> > > Subject: [PATCH] Implement known/maybe fpclassify like API for frange.
> > >
> > > gcc/ChangeLog:
[...]
> > > ---
> > >  gcc/gimple-range-fold.cc |  19 +++---
> > >  gcc/range-op-float.cc|  26 
> > >  gcc/value-range.cc   | 126 +++
> > >  gcc/value-range.h|  78 +++-
> > >  4 files changed, 170 insertions(+), 79 deletions(-)
> >
> > This triggers a selftest failure for pdp11:
> >
> > .../gcc/configure --prefix=... --enable-werror-always 
> > --enable-languages=all --disable-gcov --disable-shared --disable-threads 
> > --target=pdp11-aout --without-headers
> 
> I have just pushed a patch to fix this.
> 
> I have also added -ffinite-math-only selftests to my list of testing
> requirements for all future frange work.
> 
> Thanks for reporting this.

Thanks for the very quick fix, already confirmed here!

MfG, JBG

-- 


signature.asc
Description: PGP signature


[PATCH] C-SKY: Fix unsigned comparison warning

2022-09-12 Thread Jan-Benedict Glaw
Hi!

When -mfloat-abi=hard support was added, a cast went missing that
used to silence a warning in common code:

/usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2   -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common 
 -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include 
-I../../gcc/gcc/../libcody  -I../../gcc/gcc/../libdecnumber 
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I../../gcc/gcc/../libbacktrace   -o builtins.o -MT builtins.o -MMD -MP -MF 
./.deps/builtins.TPo ../../gcc/gcc/builtins.cc
In file included from ./tm.h:21,
 from ../../gcc/gcc/backend.h:28,
 from ../../gcc/gcc/builtins.cc:27:
../../gcc/gcc/builtins.cc: In function 'int apply_args_size()':
../../gcc/gcc/config/csky/csky.h:421:13: error: comparison of unsigned 
expression in '>= 0' is always true [-Werror=type-limits]
  421 |   (((REGNO) >= CSKY_FIRST_PARM_REGNUM\
../../gcc/gcc/builtins.cc:1444:13: note: in expansion of macro 
'FUNCTION_ARG_REGNO_P'
 1444 | if (FUNCTION_ARG_REGNO_P (regno))
  | ^~~~
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:1146: builtins.o] Error 1

The needed (int) cast is even mentioned in the comment above, so reinstate
it here.



2022-09-06  Jan-Benedict Glaw  

gcc/ChangeLog:
* config/csky/csky.h (FUNCTION_ARG_REGNO_P): Cast REGNO to (int)
to prevent warning.

diff --git a/gcc/config/csky/csky.h b/gcc/config/csky/csky.h
index 37410f0cda4..730d1b44ef1 100644
--- a/gcc/config/csky/csky.h
+++ b/gcc/config/csky/csky.h
@@ -418,7 +418,7 @@ typedef struct
The int cast is to prevent a complaint about unsigned comparison to
zero, since CSKY_FIRST_PARM_REGNUM is zero.  */
 #define FUNCTION_ARG_REGNO_P(REGNO)  \
-  (((REGNO) >= CSKY_FIRST_PARM_REGNUM\
+  (((int)(REGNO) >= CSKY_FIRST_PARM_REGNUM   \
 && (REGNO) < (CSKY_NPARM_REGS + CSKY_FIRST_PARM_REGNUM)) \
|| FUNCTION_VARG_REGNO_P(REGNO))
 

Ok for HEAD?

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Implement known/maybe fpclassify like API for frange.

2022-09-12 Thread Jan-Benedict Glaw
Hi Aldy!

On Thu, 2022-09-08 12:56:24 +0200, Aldy Hernandez via Gcc-patches 
 wrote:

> From 795baa0b044953e9f198f49e379374d633f43b47 Mon Sep 17 00:00:00 2001
> From: Aldy Hernandez 
> Date: Thu, 8 Sep 2022 08:11:43 +0200
> Subject: [PATCH] Implement known/maybe fpclassify like API for frange.
> 
> gcc/ChangeLog:
> 
>   * gimple-range-fold.cc
>   (fold_using_range::range_of_builtin_int_call): Use fpclassify like API.
>   * range-op-float.cc (finite_operand_p): Same.
>   (finite_operands_p): Same.
>   (foperator_lt::fold_range): Same.
>   (foperator_le::fold_range): Same.
>   (foperator_gt::fold_range): Same.
>   (foperator_ge::fold_range): Same.
>   (foperator_unordered::fold_range): Same.
>   (foperator_unordered::op1_range): Same.
>   (foperator_ordered::fold_range): Same.
>   * value-range.cc (frange::set_nan): Same.
>   (frange::set_signbit): Same.
>   (frange::union_): Same.
>   (frange::intersect): Same.
>   (frange::operator==): Same.
>   (frange::singleton_p): Same.
>   (frange::verify_range): Same.
>   (range_tests_nan): Same.
>   (range_tests_floats): Same.
>   * value-range.h(frange::known_finite): New.
>   (frange::maybe_inf): New.
>   (frange::known_inf): New.
>   (frange::maybe_nan): New.
>   (frange::known_nan): New.
>   (frange::known_signbit): New.
> ---
>  gcc/gimple-range-fold.cc |  19 +++---
>  gcc/range-op-float.cc|  26 
>  gcc/value-range.cc   | 126 +++
>  gcc/value-range.h|  78 +++-
>  4 files changed, 170 insertions(+), 79 deletions(-)

This triggers a selftest failure for pdp11:

.../gcc/configure --prefix=... --enable-werror-always --enable-languages=all 
--disable-gcov --disable-shared --disable-threads --target=pdp11-aout 
--without-headers
[...]
make V=1 all-gcc
[...]
/var/lib/laminar/run/gcc-pdp11-aout/13/toolchain-build/./gcc/xgcc 
-B/var/lib/laminar/run/gcc-pdp11-aout/13/toolchain-build/./gcc/  -xc -nostdinc 
/dev/null -S -o /dev/null -fself-test=../../gcc/gcc/testsuite/selftests
../../gcc/gcc/value-range.cc:3801: range_tests_signbit: FAIL: ASSERT_TRUE 
((r0.undefined_p ()))
In function 'test_fn':
cc1: internal compiler error: in fail, at selftest.cc:47
0x1757e97 selftest::fail(selftest::location const&, char const*)
  ../../gcc/gcc/selftest.cc:47
0x109ab62 range_tests_signbit
  ../../gcc/gcc/value-range.cc:3801
0x109ab62 range_tests_floats
  ../../gcc/gcc/value-range.cc:3810
0x10a9cf1 selftest::range_tests()
  ../../gcc/gcc/value-range.cc:3914
0x156e6d7 test_ranges
  ../../gcc/gcc/function-tests.cc:584
0x156e6d7 selftest::function_tests_cc_tests()
  ../../gcc/gcc/function-tests.cc:680
0x168d60b selftest::run_tests()
  ../../gcc/gcc/selftest-run-tests.cc:107
0xd968c9 toplev::run_self_tests()
  ../../gcc/gcc/toplev.cc:2184
Please submit a full bug report, with preprocessed source (by using 
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
make[1]: *** [../../gcc/gcc/c/Make-lang.in:128: s-selftest-c] Error 1

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [PATCH v3] Simplify memchr with small constant strings

2022-09-09 Thread Jan-Benedict Glaw
Hi!

On Wed, 2022-09-07 14:00:25 +0200, Richard Biener  
wrote:
> On Wed, Sep 7, 2022 at 12:58 PM Jan-Benedict Glaw  wrote:
> > ../../gcc/gcc/tree-ssa-forwprop.cc:1258:42: error: array subscript 1 is 
> > outside array bounds of 'tree_node* [1]' [-Werror=array-bounds]
> >  1258 | op[i - 1] = fold_convert_loc (loc, boolean_type_node,
> >   | ~^~~~
> >  1259 |   fold_build2_loc (loc,
> >   |   ~
> >  1260 |
> > BIT_IOR_EXPR,
> >   |
> > ~
> >  1261 |
> > boolean_type_node,
> >   |
> > ~~
> >  1262 |op[i - 
> > 1],
> >   |
> > ~~
> >  1263 |op[i]));
> >   |~~~
> > In file included from ../../gcc/gcc/system.h:707,
> >  from ../../gcc/gcc/tree-ssa-forwprop.cc:21:
> > ../../gcc/gcc/../include/libiberty.h:733:36: note: at offset 8 into object 
> > of size [0, 8] allocated by '__builtin_alloca'
> >   733 | # define alloca(x) __builtin_alloca(x)
> >   |^~~
> > ../../gcc/gcc/../include/libiberty.h:365:40: note: in expansion of macro 
> > 'alloca'
> >   365 | #define XALLOCAVEC(T, N)((T *) alloca (sizeof (T) * (N)))
> >   |^~
> > ../../gcc/gcc/tree-ssa-forwprop.cc:1250:22: note: in expansion of macro 
> > 'XALLOCAVEC'
> >  1250 |   tree *op = XALLOCAVEC (tree, isize);
> >   |  ^~
> > cc1plus: all warnings being treated as errors
> > make[1]: *** [Makefile:1146: tree-ssa-forwprop.o] Error 1
> > make[1]: Leaving directory 
> > '/var/lib/laminar/run/gcc-pru-elf/1/toolchain-build/gcc'
> > make: *** [Makefile:4583: all-gcc] Error 2
> 
> can you open a bugreport please?

Just opened (after re-verification) as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106900

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


[PATCH] mingw32: Fix warning, update documentation

2022-09-08 Thread Jan-Benedict Glaw
Hi!


The mingw32 port is the only port to have TARGET_OVERRIDES_FORMAT_ATTRIBUTES
defined. When this macro is defined, it will never evaluate to NULL, so this
check just leads to a warning:

/usr/lib/gcc-snapshot/bin/g++ -fcf-protection -fno-PIE -c  -DIN_GCC_FRONTEND 
-DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -O2   -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common 
 -DHAVE_CONFIG_H -I. -Ic-family -I../../gcc/gcc -I../../gcc/gcc/c-family 
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include 
-I../../gcc/gcc/../libcody  -I../../gcc/gcc/../libdecnumber 
-I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber 
-I../../gcc/gcc/../libbacktrace   -o c-family/c-format.o -MT 
c-family/c-format.o -MMD -MP -MF c-family/.deps/c-format.TPo 
../../gcc/gcc/c-family/c-format.cc
../../gcc/gcc/c-family/c-format.cc: In function 'const char* 
convert_format_name_to_system_name(const char*)':
../../gcc/gcc/c-family/c-format.cc:5114:42: error: the address of 
'mingw_format_attribute_overrides' will never be NULL [-Werror=address]
 5114 |   if (TARGET_OVERRIDES_FORMAT_ATTRIBUTES != NULL
In file included from ./tm.h:26,
 from ../../gcc/gcc/c-family/c-format.cc:23:
../../gcc/gcc/config/i386/mingw32.h:268:44: note: 
'mingw_format_attribute_overrides' declared here
  268 | #define TARGET_OVERRIDES_FORMAT_ATTRIBUTES 
mingw_format_attribute_overrides
  |
^~~~
../../gcc/gcc/c-family/c-format.cc:5079:30: note: in expansion of macro 
'TARGET_OVERRIDES_FORMAT_ATTRIBUTES'
 5079 | extern const target_ovr_attr TARGET_OVERRIDES_FORMAT_ATTRIBUTES[];
  |  ^~
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:1146: c-family/c-format.o] Error 1
make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-x86_64-w64-mingw32/1/toolchain-build/gcc'
make: *** [Makefile:4588: all-gcc] Error 2



  Also, when TARGET_OVERRIDES_FORMAT_ATTRIBUTES is defined,
TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT must be defined as well. Add
that requirement to the docs.


2022-09-07  Jan-Benedict Glaw  

gcc/ChangeLog:
* c-family/c-format.cc (convert_format_name_to_system_name): Fix 
warning.
* doc/tm.texi.in (TARGET_OVERRIDES_FORMAT_ATTRIBUTES): Document 
requirement
of TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT being defined as well.
* doc/tm.texi: Regenerate.

diff --git a/gcc/c-family/c-format.cc b/gcc/c-family/c-format.cc
index 68b94da40cc..a6c380bf1c8 100644
--- a/gcc/c-family/c-format.cc
+++ b/gcc/c-family/c-format.cc
@@ -5111,8 +5111,7 @@ convert_format_name_to_system_name (const char *attr_name)
 
 #ifdef TARGET_OVERRIDES_FORMAT_ATTRIBUTES
   /* Check if format attribute is overridden by target.  */
-  if (TARGET_OVERRIDES_FORMAT_ATTRIBUTES != NULL
-  && TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT > 0)
+  if (TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT > 0)
 {
   for (i = 0; i < TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT; ++i)
 {
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 5312059ea79..21b849ea32a 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -7836,7 +7836,8 @@ If defined, this macro is the number of entries in
 If defined, this macro is the name of a global variable containing
 target-specific format overrides for the @option{-Wformat} option. The
 default is to have no target-specific format overrides. If defined,
-@code{TARGET_FORMAT_TYPES} must be defined, too.
+@code{TARGET_FORMAT_TYPES} and @code{TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT}
+must be defined, too.
 @end defmac
 
 @defmac TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index e47bf28089a..858bfb80cec 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -12043,7 +12043,8 @@ If defined, this macro is the number of entries in
 If defined, this macro is the name of a global variable containing
 target-specific format overrides for the @option{-Wformat} option. The
 default is to have no target-specific format overrides. If defined,
-@code{TARGET_FORMAT_TYPES} must be defined, too.
+@code{TARGET_FORMAT_TYPES} and @code{TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT}
+must be defined, too.
 @end defmac
 
 @defmac TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT


Okay for HEAD?

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [PATCH v3] Simplify memchr with small constant strings

2022-09-07 Thread Jan-Benedict Glaw
Hi!

On Wed, 2022-07-13 09:50:14 -0700, H.J. Lu via Gcc-patches 
 wrote:
> When memchr is applied on a constant string of no more than the bytes of
> a word, simplify memchr by checking each byte in the constant string.
> 
> int f (int a)
> {
>return  __builtin_memchr ("AE", a, 2) != 0;
> }
> 
> is simplified to
> 
> int f (int a)
> {
>   return ((char) a == 'A' || (char) a == 'E') != 0;
> }

Seems this caused a regression for --target=avr-elf, pru-elf and
rl78-elf:

.../gcc/configure --prefix=... --enable-werror-always --enable-languages=all 
--disable-gcov --disable-shared --disable-threads --target=pru-elf 
--without-headers
[...]
make V=1 all-gcc
[...]
/usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2   -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common 
 -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include 
-I../../gcc/gcc/../libcody  -I../../gcc/gcc/../libdecnumber 
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I../../gcc/gcc/../libbacktrace   -o tree-ssa-forwprop.o -MT 
tree-ssa-forwprop.o -MMD -MP -MF ./.deps/tree-ssa-forwprop.TPo 
../../gcc/gcc/tree-ssa-forwprop.cc
../../gcc/gcc/tree-ssa-forwprop.cc: In function 'bool 
simplify_builtin_call(gimple_stmt_iterator*, tree)':
../../gcc/gcc/tree-ssa-forwprop.cc:1258:42: error: array subscript 1 is outside 
array bounds of 'tree_node* [1]' [-Werror=array-bounds]
 1258 | op[i - 1] = fold_convert_loc (loc, boolean_type_node,
  | ~^~~~
 1259 |   fold_build2_loc (loc,
  |   ~
 1260 |BIT_IOR_EXPR,
  |~
 1261 |
boolean_type_node,
  |
~~
 1262 |op[i - 1],
  |~~
 1263 |op[i]));
  |~~~
In file included from ../../gcc/gcc/system.h:707,
 from ../../gcc/gcc/tree-ssa-forwprop.cc:21:
../../gcc/gcc/../include/libiberty.h:733:36: note: at offset 8 into object of 
size [0, 8] allocated by '__builtin_alloca'
  733 | # define alloca(x) __builtin_alloca(x)
  |^~~
../../gcc/gcc/../include/libiberty.h:365:40: note: in expansion of macro 
'alloca'
  365 | #define XALLOCAVEC(T, N)((T *) alloca (sizeof (T) * (N)))
  |^~
../../gcc/gcc/tree-ssa-forwprop.cc:1250:22: note: in expansion of macro 
'XALLOCAVEC'
 1250 |   tree *op = XALLOCAVEC (tree, isize);
  |  ^~
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:1146: tree-ssa-forwprop.o] Error 1
make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-pru-elf/1/toolchain-build/gcc'
make: *** [Makefile:4583: all-gcc] Error 2

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Always default to DWARF2_DEBUG if not specified, warn about deprecated STABS

2022-09-07 Thread Jan-Benedict Glaw
Hi!

On Mon, 2022-08-29 22:11:35 +0200, Jan-Benedict Glaw  wrote:
> On Sun, 2022-08-28 15:32:53 -0600, Jeff Law via Gcc-patches 
>  wrote:
> > On 8/28/2022 1:50 AM, Jan-Benedict Glaw wrote:
> > > On Tue, 2021-09-21 16:25:19 +0200, Richard Biener via Gcc-patches 
> > >  wrote:
> > > > This makes defaults.h choose DWARF2_DEBUG if PREFERRED_DEBUGGING_TYPE
> > > > is not specified by the target and errors out if DWARF DWARF is not 
> > > > supported.
> > > While I think the pdp11 bits arreved, the rest did not (yet). Just
> > > checked my auto-builder logs. When building current HEAD as
> > > 
> > >   ../gcc/configure --prefix=... --enable-werror-always \
> > >   --enable-languages=all --disable-gcov \
> > >   --disable-shared --disable-threads --without-headers \
> > >   --target=...
> > >   make V=1 all-gcc
> > > 
> > > ALL of these targets won't build right now:
> [...]
> > Umm, most of those -elf targets do build.  See:
> > 
> > http://law-sandy.freeddns.org:8080
> 
> Another builder. :)  Randomly picking xtensa-elf, you're configuring
> as
> 
> + ../../gcc/configure --disable-analyzer --with-system-libunwind
> --with-newlib --without-headers --disable-threads --disable-shared
> --enable-languages=c,c++
> --prefix=/home/jlaw/jenkins/workspace/xtensa-elf/xtensa-elf-obj/gcc/../../xtensa-elf-installed
> --target=xtensa-elf
> 
> I guess the main difference that lets my builds fail might be
> --enable-languages=all (vs. c,c++ in your case.)
> 
> Maybe you'd give that a try? (...and I'll trigger a build with just
> c,c++ on my builder.)

So ... just building for --enable-languages=c,c++ usually works for
the *-elf targets, but I'm interested in building as much code as
possible. Is it expected that with --enable-languages=all, all those
targets will break? Can we have a sane default here, or need the
maintainers decide for any given debug format?

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


[PATCH] msp430: Mark unused attribute

2022-09-06 Thread Jan-Benedict Glaw
Hi Nick!

This patch fixes a small warning in the msp430 backend (tested for
--target=msp430-elf and --target=msp430-elfbare).

.../gcc/configure --prefix=... --enable-werror-always --enable-languages=all 
--disable-gcov --disable-shared --disable-threads --target=msp430-elf 
--without-headers
[...]
make V=1 all-gcc
[...]
/usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2   -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common 
 -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include 
-I../../gcc/gcc/../libcody  -I../../gcc/gcc/../libdecnumber 
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I../../gcc/gcc/../libbacktrace   -o msp430.o -MT msp430.o -MMD -MP -MF 
./.deps/msp430.TPo ../../gcc/gcc/config/msp430/msp430.cc
../../gcc/gcc/config/msp430/msp430.cc: In function 'int 
msp430_single_op_cost(rtx, bool, rtx)':
../../gcc/gcc/config/msp430/msp430.cc:1463:49: error: unused parameter 
'outer_rtx' [-Werror=unused-parameter]
 1463 | msp430_single_op_cost (rtx dst, bool speed, rtx outer_rtx)
  | ^
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:2440: msp430.o] Error 1
make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-msp430-elf/1/toolchain-build/gcc'
make: *** [Makefile:4584: all-gcc] Error 2



2022-09-06  Jan-Benedict Glaw  

gcc/ChangeLog:
* config/msp430/msp430.cc (msp430_single_op_cost): Mark unused argument.

diff --git a/gcc/config/msp430/msp430.cc b/gcc/config/msp430/msp430.cc
index 7a378ceac56..2909cabd3ff 100644
--- a/gcc/config/msp430/msp430.cc
+++ b/gcc/config/msp430/msp430.cc
@@ -1460,7 +1460,7 @@ msp430_get_inner_dest_code (rtx x)
 /* Calculate the cost of an MSP430 single-operand instruction, for operand DST
within the RTX OUTER_RTX, optimizing for speed if SPEED is true.  */
 static int
-msp430_single_op_cost (rtx dst, bool speed, rtx outer_rtx)
+msp430_single_op_cost (rtx dst, bool speed, rtx outer_rtx ATTRIBUTE_UNUSED)
 {
   enum rtx_code dst_code = GET_CODE (dst);
   const struct single_op_cost *cost_p;



Okay for HEAD?

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


[PATCH] bpf: Fix unused variable warning

2022-09-05 Thread Jan-Benedict Glaw
Hi!

Building for for bpf-unknown-none target, recent GCCs will issue an unused
variable warning as the REGNO_REG_CLASS macro doesn't actually use its
argument. Reference the argument as (void) to silence the warning.

.../gcc/configure --prefix=... --enable-werror-always --enable-languages=all 
--disable-gcov --disable-shared --disable-threads --target=bpf-unknown-none 
--without-headers
[...]
make V=1 all-gcc
[...]

/usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2   -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common 
 -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include 
-I../../gcc/gcc/../libcody  -I../../gcc/gcc/../libdecnumber 
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I../../gcc/gcc/../libbacktrace   -o regcprop.o -MT regcprop.o -MMD -MP -MF 
./.deps/regcprop.TPo ../../gcc/gcc/regcprop.cc
../../gcc/gcc/regcprop.cc: In function 'bool 
copyprop_hardreg_forward_1(basic_block, value_data*)':
../../gcc/gcc/regcprop.cc:794:24: error: unused variable 'regno' 
[-Werror=unused-variable]
  794 |   unsigned int regno = REGNO (SET_SRC (set));
  |^
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:1146: regcprop.o] Error 1
make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-bpf-unknown-none/1/toolchain-build/gcc'
make: *** [Makefile:4565: all-gcc] Error 2


Ok for HEAD?

Thanks,
  Jan-Benedict

gcc/
* config/bpf/bpf.h (REGNO_REG_CLASS): Reference arguments as (void).

diff --git a/gcc/config/bpf/bpf.h b/gcc/config/bpf/bpf.h
index 5b3f4a58763..57903477a4a 100644
--- a/gcc/config/bpf/bpf.h
+++ b/gcc/config/bpf/bpf.h
@@ -209,7 +209,7 @@ enum reg_class
register REGNO.  In general there is more that one such class;
choose a class which is "minimal", meaning that no smaller class
also contains the register.  */
-#define REGNO_REG_CLASS(REGNO) GENERAL_REGS
+#define REGNO_REG_CLASS(REGNO) ((void)(REGNO), GENERAL_REGS)
 
 /* A macro whose definition is the name of the class to which a
valid base register must belong.  A base register is one used in
-- 


signature.asc
Description: PGP signature


Re: [PATCH] Always default to DWARF2_DEBUG if not specified, warn about deprecated STABS

2022-08-29 Thread Jan-Benedict Glaw
Hi Jeff!

On Sun, 2022-08-28 15:32:53 -0600, Jeff Law via Gcc-patches 
 wrote:
> On 8/28/2022 1:50 AM, Jan-Benedict Glaw wrote:
> > On Tue, 2021-09-21 16:25:19 +0200, Richard Biener via Gcc-patches 
> >  wrote:
> > > This makes defaults.h choose DWARF2_DEBUG if PREFERRED_DEBUGGING_TYPE
> > > is not specified by the target and errors out if DWARF DWARF is not 
> > > supported.
> > While I think the pdp11 bits arreved, the rest did not (yet). Just
> > checked my auto-builder logs. When building current HEAD as
> > 
> > ../gcc/configure --prefix=... --enable-werror-always \
> > --enable-languages=all --disable-gcov \
> > --disable-shared --disable-threads --without-headers \
> > --target=...
> > make V=1 all-gcc
> > 
> > ALL of these targets won't build right now:
[...]
> Umm, most of those -elf targets do build.  See:
> 
> http://law-sandy.freeddns.org:8080

Another builder. :)  Randomly picking xtensa-elf, you're configuring
as

+ ../../gcc/configure --disable-analyzer --with-system-libunwind
--with-newlib --without-headers --disable-threads --disable-shared
--enable-languages=c,c++
--prefix=/home/jlaw/jenkins/workspace/xtensa-elf/xtensa-elf-obj/gcc/../../xtensa-elf-installed
--target=xtensa-elf

I guess the main difference that lets my builds fail might be
--enable-languages=all (vs. c,c++ in your case.)

Maybe you'd give that a try? (...and I'll trigger a build with just
c,c++ on my builder.)

MfG, JBG

-- 


signature.asc
Description: PGP signature


[PATCH] nvptx: Silence unused variable warning

2022-08-28 Thread Jan-Benedict Glaw
Hi!

The nvptx backend defines ASM_OUTPUT_DEF along with
ASM_OUTPUT_DEF_FROM_DECLS.  Much like the rs6000 coff target, nvptx
triggers an unused variable warning:

/usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2   -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common 
 -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include 
-I../../gcc/gcc/../libcody  -I../../gcc/gcc/../libdecnumber 
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I../../gcc/gcc/../libbacktrace   -o varasm.o -MT varasm.o -MMD -MP -MF 
./.deps/varasm.TPo ../../gcc/gcc/varasm.cc
../../gcc/gcc/varasm.cc: In function 'void 
output_constant_pool_contents(rtx_constant_pool*)':
../../gcc/gcc/varasm.cc:4318:21: error: unused variable 'name' 
[-Werror=unused-variable]
 4318 | const char *name = XSTR (desc->sym, 0);
  | ^~~~
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:1145: varasm.o] Error 1


Fixed the same way:

diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h
index ed72c253191..71297440566 100644
--- a/gcc/config/nvptx/nvptx.h
+++ b/gcc/config/nvptx/nvptx.h
@@ -321,6 +321,9 @@ struct GTY(()) machine_function
 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
   do   \
 {  \
+  (void) (FILE);   \
+  (void) (LABEL1); \
+  (void) (LABEL2); \
   gcc_unreachable ();  \
 }  \
   while (0)


Ok for HEAD?

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Always default to DWARF2_DEBUG if not specified, warn about deprecated STABS

2022-08-28 Thread Jan-Benedict Glaw
On Tue, 2021-09-21 16:25:19 +0200, Richard Biener via Gcc-patches 
 wrote:
> This makes defaults.h choose DWARF2_DEBUG if PREFERRED_DEBUGGING_TYPE
> is not specified by the target and errors out if DWARF DWARF is not supported.

While I think the pdp11 bits arreved, the rest did not (yet). Just
checked my auto-builder logs. When building current HEAD as

../gcc/configure --prefix=... --enable-werror-always \
--enable-languages=all --disable-gcov \
--disable-shared --disable-threads --without-headers \
--target=...
make V=1 all-gcc

ALL of these targets won't build right now:
aarch64-elf
aarch64-rtems
alpha64-dec-vms
alpha-dec-vms
arm-eabi
arm-rtems
arm-symbianelf
arm-uclinux_eabi
bfin-elf
bfin-rtems
bfin-uclinux
c6x-elf
c6x-uclinux
cris-elf
fido-elf
fr30-elf
ft32-elf
i686-elf
i686-lynxos
i686-nto-qnx
i686-pc-msdosdjgpp
i686-rtems
i686-wrs-vxworks
i686-wrs-vxworksae
lm32-elf
lm32-rtems
lm32-uclinux
m32c-elf
m68k-elf
m68k-rtems
m68k-uclinux
moxie-elf
moxie-rtems
moxie-uclinux
powerpc-eabi
powerpc-eabialtivec
powerpc-eabisim
powerpc-eabisimaltivec
powerpc-ibm-aix7.1
powerpc-ibm-aix7.2
powerpcle-eabi
powerpcle-eabisim
powerpcle-elf
powerpc-lynxos
powerpc-rtems
powerpc-wrs-vxworks
powerpc-wrs-vxworksmils
powerpc-xilinx-eabi
ppc-elf
s390x-ibm-tpf
sh-elf
sh-rtems
sh-superh-elf
sh-wrs-vxworks
sparc64-elf
sparc64-rtems
sparc-elf
sparc-leon-elf
sparc-rtems
sparc-wrs-vxworks
visium-elf
x86_64-elf --with-fpmath=sse
x86_64-rtems
xtensa-elf

So I'd like to reignite the discussion about a DWARF2 fallback. :)

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [PATCH] cr16: remove obsoleted port

2022-08-25 Thread Jan-Benedict Glaw
On Thu, 2022-08-25 14:50:12 +0200, Martin Liška  wrote:
> On 8/25/22 14:48, Jan-Benedict Glaw wrote:
> > On Thu, 2022-08-25 10:38:30 +0200, Martin Liška  wrote:
> >> Remove the port that has been marked obsolete in GCC 12 change notes.
> > 
> >> contrib/ChangeLog:
> >>
> >>* config-list.mk: Remove cr16.
> > 
> > Thanks for not forgetting this part!  I hope the scripts will properly
> > pick up the cr16 removal. We'll find out! :)
> 
> Which scripts do you mean?

My laminar job scripts, they directly use
`make -f contrib/config-list.mk show` output.

> May I install the patch?

LGTM, but I'm a write-after-approval committer and no reviewer or
global maintainer.

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH] cr16: remove obsoleted port

2022-08-25 Thread Jan-Benedict Glaw
On Thu, 2022-08-25 10:38:30 +0200, Martin Liška  wrote:
> Remove the port that has been marked obsolete in GCC 12 change notes.

> contrib/ChangeLog:
> 
>   * config-list.mk: Remove cr16.

Thanks for not forgetting this part!  I hope the scripts will properly
pick up the cr16 removal. We'll find out! :)

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [Ada] Remove useless pragma Warnings Off from runtime units

2022-06-27 Thread Jan-Benedict Glaw
Hi!


On Thu, 2022-05-12 12:40:09 +, Pierre-Marie de Rodat via Gcc-patches 
 wrote:
> GNAT does not issue a warning anymore on a postcondition of True (used
> here to prevent inining inside GNATprove for proof).
> 
> Tested on x86_64-pc-linux-gnu, committed on trunk
> 
> gcc/ada/
> 
>   * libgnat/s-valuei.ads: Remove pragma Warnings Off.
>   * libgnat/s-valueu.ads: Same.
>   * libgnat/s-valuti.ads: Same.

> diff --git a/gcc/ada/libgnat/s-valuei.ads b/gcc/ada/libgnat/s-valuei.ads
> --- a/gcc/ada/libgnat/s-valuei.ads
> +++ b/gcc/ada/libgnat/s-valuei.ads
> @@ -37,8 +37,6 @@ pragma Assertion_Policy (Pre=> Ignore,
>   Contract_Cases => Ignore,
>   Ghost  => Ignore,
>   Subprogram_Variant => Ignore);
> -pragma Warnings (Off, "postcondition does not mention function result");
> ---  True postconditions are used to avoid inlining for GNATprove

For me, this patch broke building a basic cross compiler using Debian
sid's "gcc-snapshot" package as the build/host compiler:

../gcc/configure '--with-pkgversion=basepoints/gcc-13-1183-g70454c50b45, built 
at 1655800680' --prefix=/var/lib/laminar/run/gcc-vax-linux/5/toolchain-install 
--enable-werror-always --enable-languages=all --disable-gcov --disable-shared 
--disable-threads --target=vax-linux --without-headers
[...]

make V=1 all-gcc
[...]
/usr/lib/gcc-snapshot/bin/gcc -c -g -O2-gnatpg -gnata -W -Wall -nostdinc 
-I- -I. -Iada/generated -Iada -I../../gcc/gcc/ada -Iada/libgnat 
-I../../gcc/gcc/ada/libgnat -Iada/gcc-interface 
-I../../gcc/gcc/ada/gcc-interface ../../gcc/gcc/ada/libgnat/s-valint.adb -o 
ada/libgnat/s-valint.o
mkdir -p ada/libgnat/
/usr/lib/gcc-snapshot/bin/gcc -c -g -O2-gnatpg -gnata -W -Wall -nostdinc 
-I- -I. -Iada/generated -Iada -I../../gcc/gcc/ada -Iada/libgnat 
-I../../gcc/gcc/ada/libgnat -Iada/gcc-interface 
-I../../gcc/gcc/ada/gcc-interface ../../gcc/gcc/ada/libgnat/s-valuns.adb -o 
ada/libgnat/s-valuns.o
mkdir -p ada/libgnat/
/usr/lib/gcc-snapshot/bin/gcc -c -g -O2-gnatpg -gnata -W -Wall -nostdinc 
-I- -I. -Iada/generated -Iada -I../../gcc/gcc/ada -Iada/libgnat 
-I../../gcc/gcc/ada/libgnat -Iada/gcc-interface 
-I../../gcc/gcc/ada/gcc-interface ../../gcc/gcc/ada/libgnat/s-valuti.adb -o 
ada/libgnat/s-valuti.o
s-valuti.ads:63:06: warning: postcondition does not mention function result 
[-gnatw.t]
make[1]: *** [../../gcc/gcc/ada/gcc-interface/Make-lang.in:167: 
ada/libgnat/s-valuti.o] Error 1
make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-vax-linux/5/toolchain-build/gcc'
make: *** [Makefile:4615: all-gcc] Error 2




I'm not an Ada developer, just keeping an eye on GCC and doing
automated builds. Looking at the patch it seems that switching off the
"postcondition does not mention function result" warning was done
under the impression that only a _very_ new GCC is used and my
"gcc-snapshot" package is too old to already contain the fixes
submitted in the patches before this pragma removal.

  If that's correct, that boils down to a specific minimum version to
build with, or adding back the pragmas to allow a bootstrap with an
older compiler version.

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Always default to DWARF2_DEBUG if not specified, warn about deprecated STABS

2021-10-24 Thread Jan-Benedict Glaw
Hi Richard,

On Sun, 2021-10-24 08:36:36 +0200, Richard Biener  wrote:
> On October 23, 2021 10:00:05 PM GMT+02:00, Jan-Benedict Glaw 
>  wrote:
> >On Tue, 2021-09-21 16:25:19 +0200, Richard Biener via Gcc-patches 
> > wrote:
> >> I have built all targets from contrib/config-list.mk to make sure we
> >> don't run into the #error and the following makes the STABS usage
> >> explicit for pdp11 and hppa with SOM.
> >
> >I'm running build tests based on config-list.mk as well and see a good
> >number of targets failing, all about the same, ie. for moxie-elf:
> 
> That's odd. I did test the patch using config-list.mk - the patch
> sat in the comit tree for quite a while since that exercise (but
> unchanged), but I doubt anything significant changed in between. 
> 
> >[all 2021-10-17 00:01:19] /usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c  
> >-DIN_GCC_FRONTEND -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   
> >-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall 
> >-Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag 
> >-Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long 
> >-Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  
> >-DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
> >-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include 
> >-I../../gcc/gcc/../libcody  -I../../gcc/gcc/../libdecnumber 
> >-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
> >-I../../gcc/gcc/../libbacktrace   -o default-d.o -MT default-d.o -MMD -MP 
> >-MF ./.deps/default-d.TPo ../../gcc/gcc/config/default-d.c
> >[all 2021-10-17 00:01:19] In file included from ./tm_d.h:9,
> >[all 2021-10-17 00:01:19]  from 
> >../../gcc/gcc/config/default-d.c:22:
> >[all 2021-10-17 00:01:19] ../../gcc/gcc/defaults.h:908:2: error: #error You 
> >must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported
> 
> Is that building the D frontend? I remember restricting the builds to C... 

Probably. I configure as

.../gcc/configure --target=moxie-elf --enable-werror-always
--enable-languages=all --disable-gcov --disable-shared
--disable-threads --without-headers
--prefix=/var/lib/laminar/run/gcc-moxie-elf/13/toolchain-install

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Always default to DWARF2_DEBUG if not specified, warn about deprecated STABS

2021-10-23 Thread Jan-Benedict Glaw
Hi Richard,

On Tue, 2021-09-21 16:25:19 +0200, Richard Biener via Gcc-patches 
 wrote:
> I have built all targets from contrib/config-list.mk to make sure we
> don't run into the #error and the following makes the STABS usage
> explicit for pdp11 and hppa with SOM.

I'm running build tests based on config-list.mk as well and see a good
number of targets failing, all about the same, ie. for moxie-elf:

[all 2021-10-17 00:01:19] /usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c  
-DIN_GCC_FRONTEND -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. 
-I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include 
-I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody  
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd 
-I../libdecnumber -I../../gcc/gcc/../libbacktrace   -o default-d.o -MT 
default-d.o -MMD -MP -MF ./.deps/default-d.TPo ../../gcc/gcc/config/default-d.c
[all 2021-10-17 00:01:19] In file included from ./tm_d.h:9,
[all 2021-10-17 00:01:19]  from 
../../gcc/gcc/config/default-d.c:22:
[all 2021-10-17 00:01:19] ../../gcc/gcc/defaults.h:908:2: error: #error You 
must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported
[all 2021-10-17 00:01:19]   908 | #error You must define 
PREFERRED_DEBUGGING_TYPE if DWARF is not supported
[all 2021-10-17 00:01:19]   |  ^
[all 2021-10-17 00:01:20] make[1]: *** [Makefile:2330: default-d.o] Error 1
[all 2021-10-17 00:01:21] make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-moxie-elf/13/toolchain-build/gcc'
[all 2021-10-17 00:01:21] make: *** [Makefile:4423: all-gcc] Error 2

Shall I try to ping all the maintainers?

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Restore --param=max-fsm-thread-length

2021-10-20 Thread Jan-Benedict Glaw
On Wed, 2021-10-20 09:43:42 +0200, Aldy Hernandez via Gcc-patches 
 wrote:
> The removal of --param=max-fsm-thread-length is causing code
> explosion.  I thought that --param=max-fsm-thread-path-insns was a
> better gague for path profitability than raw BB length, but it turns
> out that we don't take into account PHIs when estimating the number of
> statements.
[...]
> 
> This fixes 102814, 102852, and I bet it solves the Linux kernel cross
> compile issue.

It does!

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Cleanup --params for backward threader.

2021-10-19 Thread Jan-Benedict Glaw
Hi Aldy!

On Thu, 2021-10-14 16:25:48 +0200, Aldy Hernandez via Gcc-patches 
 wrote:
> The new backward threader makes some of the --param knobs used to
> control it questionable at best or no longer applicable at worst.
> 
> The fsm-maximum-phi-arguments param is unused and can be removed.
> 
> The max-fsm-thread-length param is block based which is a bit redundant,
> since we already restrict paths based on instruction estimates.
> 
> The max-fsm-thread-paths restricts the total number of threadable paths
> in a function.  We probably don't need this.  Besides, the forward
> threader has no such restriction.
> 
> OK pending tests?

This causes a regression for me. I'm auto-building lots of GCC
cross-compilers and use these to cross-build the Linux kernel.

  Using binutils/gas/gcc configured for --target=sh-linux (actual
configuration for GCC is this:

.../gcc/configure --target=sh-linux --enable-werror-always \
  --enable-languages=all --disable-gcov\
  --disable-shared --disable-threads   \
  --without-headers \
  
--prefix=/var/lib/laminar/run/gcc-sh-linux/13/toolchain-install
)

Then, building Linux for a good number of default configurations for
ARCH=sh and ARCH=arm, GCC will just loop:

$ make ARCH=sh distclean
$ cp arch/sh/configs/r7780mp_defconfig .config
$ make V=1 ARCH=sh CROSS_COMPILE=sh-linux- oldconfig < /dev/null
$ make V=1 ARCH=sh CROSS_COMPILE=sh-linux- prepare
$ make V=1 ARCH=sh CROSS_COMPILE=sh-linux- all
[...]
  sh-linux-gcc -Wp,-MMD,drivers/ata/.libata-core.o.d -nostdinc -isystem 
/tmp/testbed/install/lib/gcc/sh-linux/12.0.0/include -I./arch/sh/include 
-I./arch/sh/include/generated  -I./include -I./arch/sh/include/uapi 
-I./arch/sh/include/generated/uapi -I./include/uapi -I./include/generated/uapi 
-include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h 
-include ./include/linux/compiler_types.h -D__KERNEL__ -m4 -m4-nofpu -m4a 
-m4a-nofpu -ml -mno-fdpic -Wa,-isa=sh4a-up -ffreestanding -I 
./arch/sh/include/cpu-sh4a -I ./arch/sh/include/cpu-sh4 -I 
./arch/sh/include/cpu-common -I ./arch/sh/include/mach-highlander -I 
./arch/sh/include/mach-common -fmacro-prefix-map=./= -Wall -Wundef 
-Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common 
-fshort-wchar -fno-PIE -Werror=implicit-function-declaration 
-Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -pipe 
-m4 -m4-nofpu -m4a -m4a-nofpu -ml -mno-fdpic -Wa,-isa=sh4a-up -ffreestanding -I 
./arch/sh/include/cpu-sh4a -I ./arch/sh/include/cpu-sh4 -I 
./arch/sh/include/cpu-common -I ./arch/sh/include/mach-highlander -I 
./arch/sh/include/mach-common -fno-delete-null-pointer-checks 
-Wno-frame-address -Wno-format-truncation -Wno-format-overflow 
-Wno-address-of-packed-member -O2 -fno-allow-store-data-races 
-Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 
-Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable 
-fomit-frame-pointer -ftrivial-auto-var-init=zero 
-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang 
-fno-stack-clash-protection -g -Wdeclaration-after-statement -Wvla 
-Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds 
-Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized 
-fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time 
-Werror=incompatible-pointer-types -Werror=designated-init 
-Wno-packed-not-aligned-DKBUILD_MODFILE='"drivers/ata/libata"' 
-DKBUILD_BASENAME='"libata_core"' -DKBUILD_MODNAME='"libata"' 
-D__KBUILD_MODNAME=kmod_libata -c -o drivers/ata/libata-core.o 
drivers/ata/libata-core.c


(gdb) bt
#0  0x0100318e in vec::operator[] 
(ix=0, this=0x50ee6e0) at ../../gcc/gcc/vec.h:1495
#1  back_jt_path_registry::adjust_paths_after_duplication (this=0x7ffdf8b6e868, 
curr_path_num=0) at ../../gcc/gcc/tree-ssa-threadupdate.c:2315
#2  0x01003c0d in back_jt_path_registry::duplicate_thread_path 
(this=0x7ffdf8b6e868, entry=0x7f92651000c0, exit=, 
region=, n_region=8, 
current_path_no=0) at ../../gcc/gcc/tree-ssa-threadupdate.c:2546
#3  0x010051e4 in back_jt_path_registry::update_cfg 
(this=0x7ffdf8b6e868) at ../../gcc/gcc/tree-ssa-threadupdate.c:2656
#4  0x01003ecc in jt_path_registry::thread_through_all_blocks 
(this=0x7ffdf8b6e868, peel_loop_headers=) at 
../../gcc/gcc/tree-ssa-threadupdate.c:2604
#5  0x00ffb5a7 in back_threader_registry::thread_through_all_blocks 
(may_peel_loop_headers=true, this=0x7ffdf8b6e868) at 
../../gcc/gcc/tree-ssa-threadbackward.c:556
#6  back_threader::thread_through_all_blocks (may_peel_loop_headers=true, 
this=0x7ffdf8b6e860) at ../../gcc/gcc/tree-ssa-threadbackward.c:501
#7  (anonymous namespace)::try_thread_blocks (fun=fun@entry=0x7f926eb389c0) at 
../../gcc/gcc/tree-ssa-threadbackward.c:946
#8  0x00ffb5eb in (anonymous 

Re: PING: [AVR] Fix unused argument warning

2021-10-05 Thread Jan-Benedict Glaw
Hi Jeff,

On Tue, 2021-10-05 08:53:00 -0600, Jeff Law  wrote:
> On 10/5/2021 8:46 AM, Jan-Benedict Glaw wrote:
> > On Thu, 2021-09-30 21:27:23 +0200, Jan-Benedict Glaw  
> > wrote:
> > > gcc/ChangeLog:
> > > 
> > >   * common/config/avr/avr-common.c (avr_handle_option): Mark
> > >   argument as ATTRIBUTE_UNUSED.
> > > 
> > > diff --git a/gcc/common/config/avr/avr-common.c 
> > > b/gcc/common/config/avr/avr-common.c
> > > index 6486659d27c..a6939ad03d3 100644
> > > --- a/gcc/common/config/avr/avr-common.c
> > > +++ b/gcc/common/config/avr/avr-common.c
> > > @@ -77,7 +77,8 @@ static const struct default_options 
> > > avr_option_optimization_table[] =
> > >   static bool
> > >   avr_handle_option (struct gcc_options *opts, struct gcc_options*,
> > > -   const struct cl_decoded_option *decoded, location_t 
> > > loc)
> > > +   const struct cl_decoded_option *decoded,
> > > +   location_t loc ATTRIBUTE_UNUSED)
> > >   {
> > > int value = decoded->value;
> > > 
> > > 
> > >Ok for trunk?
> > Wanted to give this a ping.
> I thought I sent a reply a few days ago.  Instead of using ATTRIBUTE_UNUSED,
> just drop the parameter's name.  You should consider that pre-approved for
> this and any other cases you run into.

Not quite I think. The `loc`ation parameter is used under some
circumstances, though it's dependant on some #ifdefs:

 78 static bool
 79 avr_handle_option (struct gcc_options *opts, struct gcc_options*,
 80const struct cl_decoded_option *decoded,
 81location_t loc ATTRIBUTE_UNUSED)
 82 {
 83   int value = decoded->value;
 84 
 85   switch (decoded->opt_index)
 86 {
 87 case OPT_mdouble_:
 88   if (value == 64)
 89 {
 90 #if !defined (HAVE_DOUBLE64)
 91   error_at (loc, "option %<-mdouble=64%> is only available if "
 92 "configured %<--with-double={64|64,32|32,64}%>");
 93 #endif
 94   opts->x_avr_long_double = 64;
 95 }
 96   else if (value == 32)
 97 {
 98 #if !defined (HAVE_DOUBLE32)
 99   error_at (loc, "option %<-mdouble=32%> is only available if "
100 "configured %<--with-double={32|32,64|64,32}%>");
101 #endif
102 }

Also, this implements the TARGET_HANDLE_OPTION function, so changing
the arguments wouldn't really work and as the `loc` argument is used
under certain circumstances, I kept it as is and marked it unused.
(Adding an #ifdef in front doesn't make the code any more readable.)

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


PING: [LM32] Fix '"LINK_GCC_C_SEQUENCE_SPEC" redefined' warning

2021-10-05 Thread Jan-Benedict Glaw
Hi,

On Thu, 2021-09-30 21:34:51 +0200, Jan-Benedict Glaw  wrote:
> gcc/ChangeLog:
> 
>   * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC):
>   Undefine before redefinition.
> 
> diff --git a/gcc/config/lm32/uclinux-elf.h b/gcc/config/lm32/uclinux-elf.h
> index 370df4c55dd..5b638fa5db2 100644
> --- a/gcc/config/lm32/uclinux-elf.h
> +++ b/gcc/config/lm32/uclinux-elf.h
> @@ -67,6 +67,7 @@
>  
>  #define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS()
>  
> +#undef LINK_GCC_C_SEQUENCE_SPEC
>  #define LINK_GCC_C_SEQUENCE_SPEC \
>"%{static|static-pie:--start-group} %G %{!nolibc:%L} \
> %{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}"
> 
> Ok for trunk?

...and a ping for this patch.

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


PING: [AVR] Fix unused argument warning

2021-10-05 Thread Jan-Benedict Glaw
Hi,

On Thu, 2021-09-30 21:27:23 +0200, Jan-Benedict Glaw  wrote:
> gcc/ChangeLog:
> 
>   * common/config/avr/avr-common.c (avr_handle_option): Mark
>   argument as ATTRIBUTE_UNUSED.
> 
> diff --git a/gcc/common/config/avr/avr-common.c 
> b/gcc/common/config/avr/avr-common.c
> index 6486659d27c..a6939ad03d3 100644
> --- a/gcc/common/config/avr/avr-common.c
> +++ b/gcc/common/config/avr/avr-common.c
> @@ -77,7 +77,8 @@ static const struct default_options 
> avr_option_optimization_table[] =
>  
>  static bool
>  avr_handle_option (struct gcc_options *opts, struct gcc_options*,
> -   const struct cl_decoded_option *decoded, location_t loc)
> +   const struct cl_decoded_option *decoded,
> +   location_t loc ATTRIBUTE_UNUSED)
>  {
>int value = decoded->value;
>  
> 
> 
>   Ok for trunk?

Wanted to give this a ping.

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


[LM32] Fix '"LINK_GCC_C_SEQUENCE_SPEC" redefined' warning

2021-09-30 Thread Jan-Benedict Glaw
Hi!

When configuring GCC for --target=lm32-uclinux --enable-werror-always,
it breaks here:

[all 2021-09-30 08:55:55] /usr/lib/gcc-snapshot/bin/g++ -c   -g -O2 -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE 
-I. -Ibuild -I../../gcc/gcc -I../../gcc/gcc/build -I../../gcc/gcc/../include  
-I../../gcc/gcc/../libcpp/include  \
[all 2021-09-30 08:55:55]  -o build/genpreds.o ../../gcc/gcc/genpreds.c
[all 2021-09-30 08:55:55] In file included from ./tm.h:29,
[all 2021-09-30 08:55:55]  from ../../gcc/gcc/genpreds.c:26:
[all 2021-09-30 08:55:55] ../../gcc/gcc/config/lm32/uclinux-elf.h:70: error: 
"LINK_GCC_C_SEQUENCE_SPEC" redefined [-Werror]
[all 2021-09-30 08:55:55]70 | #define LINK_GCC_C_SEQUENCE_SPEC \
[all 2021-09-30 08:55:55]   | 
[all 2021-09-30 08:55:55] In file included from ./tm.h:27,
[all 2021-09-30 08:55:55]  from ../../gcc/gcc/genpreds.c:26:
[all 2021-09-30 08:55:55] ../../gcc/gcc/config/gnu-user.h:117: note: this is 
the location of the previous definition
[all 2021-09-30 08:55:55]   117 | #define LINK_GCC_C_SEQUENCE_SPEC 
GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC
[all 2021-09-30 08:55:55]   | 
[all 2021-09-30 08:55:58] cc1plus: all warnings being treated as errors
[all 2021-09-30 08:55:58] make[1]: *** [Makefile:2825: build/genpreds.o] Error 1

Easy fix, just undefine LINK_GCC_C_SEQUENCE_SPEC beforehand:


gcc/ChangeLog:

* config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC):
Undefine before redefinition.

diff --git a/gcc/config/lm32/uclinux-elf.h b/gcc/config/lm32/uclinux-elf.h
index 370df4c55dd..5b638fa5db2 100644
--- a/gcc/config/lm32/uclinux-elf.h
+++ b/gcc/config/lm32/uclinux-elf.h
@@ -67,6 +67,7 @@
 
 #define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS()
 
+#undef LINK_GCC_C_SEQUENCE_SPEC
 #define LINK_GCC_C_SEQUENCE_SPEC \
   "%{static|static-pie:--start-group} %G %{!nolibc:%L} \
%{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}"

Ok for trunk?

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


[AVR] Fix unused argument warning

2021-09-30 Thread Jan-Benedict Glaw
Hi!

Configuring GCC with --target=avr-elf --enable-werror-always, I see
this warning that's easy to fix. The options are parsed with a lot of
#ifdefs and it may actually just be unused. Let's just mark it as such.

[all 2021-09-30 00:43:46] /usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2 
-DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. 
-I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include 
-I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody  
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd 
-I../libdecnumber -I../../gcc/gcc/../libbacktrace   -o avr-common.o -MT 
avr-common.o -MMD -MP -MF ./.deps/avr-common.TPo 
../../gcc/gcc/common/config/avr/avr-common.c
[all 2021-09-30 00:43:47] ../../gcc/gcc/common/config/avr/avr-common.c: In 
function 'bool avr_handle_option(gcc_options*, gcc_options*, const 
cl_decoded_option*, location_t)':
[all 2021-09-30 00:43:47] ../../gcc/gcc/common/config/avr/avr-common.c:80:72: 
error: unused parameter 'loc' [-Werror=unused-parameter]
[all 2021-09-30 00:43:47]80 |const struct 
cl_decoded_option *decoded, location_t loc)
[all 2021-09-30 00:43:47]   |   
  ~~~^~~
[all 2021-09-30 00:43:47] cc1plus: all warnings being treated as errors
[all 2021-09-30 00:43:47] make[1]: *** [Makefile:2420: avr-common.o] Error 1

gcc/ChangeLog:

* common/config/avr/avr-common.c (avr_handle_option): Mark
argument as ATTRIBUTE_UNUSED.



diff --git a/gcc/common/config/avr/avr-common.c 
b/gcc/common/config/avr/avr-common.c
index 6486659d27c..a6939ad03d3 100644
--- a/gcc/common/config/avr/avr-common.c
+++ b/gcc/common/config/avr/avr-common.c
@@ -77,7 +77,8 @@ static const struct default_options 
avr_option_optimization_table[] =
 
 static bool
 avr_handle_option (struct gcc_options *opts, struct gcc_options*,
-   const struct cl_decoded_option *decoded, location_t loc)
+   const struct cl_decoded_option *decoded,
+   location_t loc ATTRIBUTE_UNUSED)
 {
   int value = decoded->value;
 


  Ok for trunk?

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Add cr16-*-* to the list of obsoleted targets

2021-09-13 Thread Jan-Benedict Glaw
Hi!

On Mon, 2021-09-13 11:58:59 +0200, Richard Biener  wrote:
> On Mon, 13 Sep 2021, Jan-Benedict Glaw wrote:
> > contrib/ChangeLog:
> > 
> > * config-list.mk (LIST): --enable-obsolete for cr16-elf.
> > 
[...]
> OK.

Committed, thanks!

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Fix multi-statement define for alpha-dec-vms

2021-09-13 Thread Jan-Benedict Glaw
Hi!

On Mon, 2021-09-13 11:11:30 +0200, Richard Biener  
wrote:
> On Sun, Sep 12, 2021 at 8:12 PM Jan-Benedict Glaw  wrote:
> > gcc/ChangeLog:
> >
> > * config/alpha/vms.h (INIT_CUMULATIVE_ARGS): Wrap multi-statment
> > define into a block.
> OK.

Committed, thanks!

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH] Add cr16-*-* to the list of obsoleted targets

2021-09-13 Thread Jan-Benedict Glaw
Hi Richard,

On Mon, 2021-09-13 11:24:53 +0200, Richard Biener via Gcc-patches 
 wrote:
> This adds cr16-*-* to the list of obsoleted targets in config.gcc
> 
> Approved by Jeff in another thread, pushed.  cr16 has no maintainer and
> it's still cc0.
> 
> 2021-09-13  Richard Biener  
> 
>   * config.gcc: Add cr16-*-* to the list of obsoleted targets.

for the time being, please update ./contrib/config-list.mk to list
"cr16-elf" as "cr16-elfOPT-enable-obsolete". Or anybody to ACK this
for trunk?

contrib/ChangeLog:

* config-list.mk (LIST): --enable-obsolete for cr16-elf.

diff --git a/contrib/config-list.mk b/contrib/config-list.mk
index b9e9dd0b34b..b493e69f5d6 100644
--- a/contrib/config-list.mk
+++ b/contrib/config-list.mk
@@ -40,7 +40,7 @@ LIST = aarch64-elf aarch64-linux-gnu aarch64-rtems \
   arm-symbianelf avr-elf \
   bfin-elf bfin-uclinux bfin-linux-uclibc bfin-rtems bfin-openbsd \
   bpf-unknown-none \
-  c6x-elf c6x-uclinux cr16-elf cris-elf \
+  c6x-elf c6x-uclinux cr16-elfOPT-enable-obsolete cris-elf \
   csky-elf csky-linux-gnu \
   epiphany-elf epiphany-elfOPT-with-stack-offset=16 fido-elf \
   fr30-elf frv-elf frv-linux ft32-elf h8300-elf hppa-linux-gnu \


Thanks,
  Jan-Benedict
-- 


signature.asc
Description: PGP signature


Re: [PATCH] Remove dbx.h, do not set PREFERRED_DEBUGGING_TYPE from dbxcoff.h, lynx.h

2021-09-12 Thread Jan-Benedict Glaw
Hi Richard,

On Fri, 2021-09-10 08:02:00 +0200, Richard Biener via Gcc-patches 
 wrote:
> > On 9/9/2021 7:19 AM, Richard Biener via Gcc-patches wrote:
> > > The patch also removes the PREFERRED_DEBUGGING_TYPE define from
> > > lynx.h which always follows elfos.h already defaulting to DWARF,
> > > so the comment about STABS being the default is misleading and
> > > outdated.  There's no listed maintainer for Lynx OS.
> > >
> > > I have not tested this in any ways but I also have no idea how
> > > to meaningfully do so.

I'm not actually running such a configuration and cannot properly test
it, but automated mass-building broke for --target=i686-lynxos:

[all 2021-09-13 00:17:48] /usr/lib/gcc-snapshot/bin/g++ -c   -g -O2 -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE 
-fno-PIE -I. -Ibuild -I../../gcc/gcc -I../../gcc/gcc/build 
-I../../gcc/gcc/../include  -I../../gcc/gcc/../libcpp/include  \
[all 2021-09-13 00:17:48]  -o build/genconstants.o ../../gcc/gcc/genconstants.c
[all 2021-09-13 00:17:49] /usr/lib/gcc-snapshot/bin/g++   -g -O2 -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE 
-fno-PIE -static-libstdc++ -static-libgcc  -no-pie -o build/genconstants \
[all 2021-09-13 00:17:49] build/genconstants.o build/read-md.o 
build/errors.o ../build-x86_64-pc-linux-gnu/libiberty/libiberty.a
[all 2021-09-13 00:17:49] build/genconstants ../../gcc/gcc/common.md 
../../gcc/gcc/config/i386/i386.md \
[all 2021-09-13 00:17:49]> tmp-constants.h
[all 2021-09-13 00:17:49] /bin/bash ../../gcc/gcc/../move-if-change 
tmp-constants.h insn-constants.h
[all 2021-09-13 00:17:49] echo timestamp > s-constants
[all 2021-09-13 00:17:49] /usr/lib/gcc-snapshot/bin/g++ -c   -g -O2 -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE 
-fno-PIE -I. -Ibuild -I../../gcc/gcc -I../../gcc/gcc/build 
-I../../gcc/gcc/../include  -I../../gcc/gcc/../libcpp/include  \
[all 2021-09-13 00:17:49]  -o build/genpreds.o ../../gcc/gcc/genpreds.c
[all 2021-09-13 00:17:49] In file included from ./tm.h:37,
[all 2021-09-13 00:17:49]  from ../../gcc/gcc/genpreds.c:26:
[all 2021-09-13 00:17:49] ../../gcc/gcc/defaults.h:910:2: error: #error You 
must define PREFERRED_DEBUGGING_TYPE
[all 2021-09-13 00:17:49]   910 | #error You must define 
PREFERRED_DEBUGGING_TYPE
[all 2021-09-13 00:17:49]   |  ^
[all 2021-09-13 00:17:50] make[1]: *** [Makefile:2831: build/genpreds.o] Error 1
[all 2021-09-13 00:17:50] make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-i686-lynxos/8/toolchain-build/gcc'
[all 2021-09-13 00:17:50] make: *** [Makefile:4423: all-gcc] Error 2

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


[PATCH] Fix multi-statement define for alpha-dec-vms

2021-09-12 Thread Jan-Benedict Glaw
Hi!

While mass-building a cross-gcc, I noticed that for
alpha-dec-vms/alpha64-dec-vms, recent GCC versions correctly throw a warning
due to a multi-statement define that gets rippen in an if/else case:

[all 2021-09-12 15:51:55] /usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2 
-DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. 
-I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include 
-I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody  
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd 
-I../libdecnumber -I../../gcc/gcc/../libbacktrace   -o value-prof.o -MT 
value-prof.o -MMD -MP -MF ./.deps/value-prof.TPo ../../gcc/gcc/value-prof.c
[all 2021-09-12 15:52:01] /usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2 
-DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. 
-I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include 
-I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody  
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd 
-I../libdecnumber -I../../gcc/gcc/../libbacktrace   -o var-tracking.o -MT 
var-tracking.o -MMD -MP -MF ./.deps/var-tracking.TPo 
../../gcc/gcc/var-tracking.c
[all 2021-09-12 15:52:03] In file included from ./tm.h:21,
[all 2021-09-12 15:52:03]  from ../../gcc/gcc/backend.h:28,
[all 2021-09-12 15:52:03]  from ../../gcc/gcc/var-tracking.c:91:
[all 2021-09-12 15:52:03] ../../gcc/gcc/var-tracking.c: In function 'void 
prepare_call_arguments(basic_block, rtx_insn*)':
[all 2021-09-12 15:52:03] ../../gcc/gcc/config/alpha/vms.h:148:3: error: macro 
expands to multiple statements [-Werror=multistatement-macros]
[all 2021-09-12 15:52:03]   148 |   (CUM).num_args = 0; 
  \
[all 2021-09-12 15:52:03]   |   ^
[all 2021-09-12 15:52:03] ../../gcc/gcc/var-tracking.c:6334:17: note: in 
expansion of macro 'INIT_CUMULATIVE_ARGS'
[all 2021-09-12 15:52:03]  6334 | INIT_CUMULATIVE_ARGS 
(args_so_far_v, type, NULL_RTX, fndecl,
[all 2021-09-12 15:52:03]   | ^~~~
[all 2021-09-12 15:52:03] ../../gcc/gcc/var-tracking.c:6332:15: note: some 
parts of macro expansion are not guarded by this 'else' clause
[all 2021-09-12 15:52:03]  6332 |   else
[all 2021-09-12 15:52:03]   |   ^~~~
[all 2021-09-12 15:52:20] cc1plus: all warnings being treated as errors
[all 2021-09-12 15:52:20] make[1]: *** [Makefile:1143: var-tracking.o] Error 1
[all 2021-09-12 15:52:20] make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-alpha64-dec-vms/8/toolchain-build/gcc'
[all 2021-09-12 15:52:20] make: *** [Makefile:4425: all-gcc] Error 2




gcc/ChangeLog:

* config/alpha/vms.h (INIT_CUMULATIVE_ARGS): Wrap multi-statment
define into a block.


diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h
index b8673b6b6fb..e979aef10c7 100644
--- a/gcc/config/alpha/vms.h
+++ b/gcc/config/alpha/vms.h
@@ -145,9 +145,13 @@ typedef struct {int num_args; enum avms_arg_type 
atypes[6];} avms_arg_info;
 
 #undef INIT_CUMULATIVE_ARGS
 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
-  (CUM).num_args = 0;  \
-  (CUM).atypes[0] = (CUM).atypes[1] = (CUM).atypes[2] = I64;   \
-  (CUM).atypes[3] = (CUM).atypes[4] = (CUM).atypes[5] = I64;
+  do   \
+{  \
+  (CUM).num_args = 0;  \
+  (CUM).atypes[0] = (CUM).atypes[1] = (CUM).atypes[2] = I64;   \
+  (CUM).atypes[3] = (CUM).atypes[4] = (CUM).atypes[5] = I64;   \
+}  \
+  while (0)
 
 #define DEFAULT_PCC_STRUCT_RETURN 0
 



Okay for trunk?

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: [PATCH 0/13] v2 warning control by group and location (PR 74765)

2021-07-17 Thread Jan-Benedict Glaw
Hi Martin!

On Fri, 2021-06-04 15:27:04 -0600, Martin Sebor  wrote:
> This is a revised patch series to add warning control by group and
> location, updated based on feedback on the initial series.
[...]

My automated checking (in this case: Using Debian's "gcc-snapshot"
package) indicates that between versions 1:20210527-1 and
1:20210630-1, building GDB breaks. Your patch is a likely candidate.
It's a case where a method asks for a nonnull argument and later on
checks for NULLness again. The build log is currently available at
(http://wolf.lug-owl.de:8080/jobs/gdb-vax-linux/5), though obviously
breaks for any target:

configure --target=vax-linux --prefix=/tmp/gdb-vax-linux
make all-gdb

[...]
[all 2021-07-16 19:19:25]   CXXcompile/compile.o
[all 2021-07-16 19:19:30] In file included from 
./../gdbsupport/common-defs.h:126,
[all 2021-07-16 19:19:30]  from ./defs.h:28,
[all 2021-07-16 19:19:30]  from compile/compile.c:20:
[all 2021-07-16 19:19:30] ./../gdbsupport/gdb_unlinker.h: In constructor 
'gdb::unlinker::unlinker(const char*)':
[all 2021-07-16 19:19:30] ./../gdbsupport/gdb_assert.h:35:4: error: 'nonnull' 
argument 'filename' compared to NULL [-Werror=nonnull-compare]
[all 2021-07-16 19:19:30]35 |   ((void) ((expr) ? 0 :   
\
[all 2021-07-16 19:19:30]   |   
~^~~~
[all 2021-07-16 19:19:30]36 |(gdb_assert_fail (#expr, __FILE__, 
__LINE__, FUNCTION_NAME), 0)))
[all 2021-07-16 19:19:30]   |
~
[all 2021-07-16 19:19:30] ./../gdbsupport/gdb_unlinker.h:38:5: note: in 
expansion of macro 'gdb_assert'
[all 2021-07-16 19:19:30]38 | gdb_assert (filename != NULL);
[all 2021-07-16 19:19:30]   | ^~
[all 2021-07-16 19:19:31] cc1plus: all warnings being treated as errors
[all 2021-07-16 19:19:31] make[1]: *** [Makefile:1641: compile/compile.o] Error 
1
[all 2021-07-16 19:19:31] make[1]: Leaving directory 
'/var/lib/laminar/run/gdb-vax-linux/5/binutils-gdb/gdb'
[all 2021-07-16 19:19:31] make: *** [Makefile:11410: all-gdb] Error 2


Code is this:

 31 class unlinker
 32 {
 33  public:
 34 
 35   unlinker (const char *filename) ATTRIBUTE_NONNULL (2)
 36 : m_filename (filename)
 37   {
 38 gdb_assert (filename != NULL);
 39   }

I'm quite undecided whether this is bad behavior of GCC or bad coding
style in Binutils/GDB, or both.

Thanks,
  Jan-Benedict

-- 


signature.asc
Description: PGP signature


Re: pdp11: Fix warnings to allow compilation with a recent GCC and --enable-werror-always

2021-06-29 Thread Jan-Benedict Glaw
On Mon, 2021-06-28 16:17:13 +, Koning, Paul  wrote:
> > On Jun 28, 2021, at 11:33 AM, Jan-Benedict Glaw  wrote:
> > 
> > I'd like to install this patch to let the pdp11-aout configuration
> > build again with eg.
[...]
> > Okay for master?
> Yes, thanks!

Pushed. Thanks!

MfG, JBG

-- 


signature.asc
Description: PGP signature


pdp11: Fix warnings to allow compilation with a recent GCC and --enable-werror-always

2021-06-28 Thread Jan-Benedict Glaw
Hi Paul!

I'd like to install this patch to let the pdp11-aout configuration
build again with eg.

../gcc/configure --target=pdp11-aout --enable-werror-always \
--enable-languages=all --disable-gcov --disable-shared \
--disable-threads --without-headers \
--prefix=/var/lib/laminar/run/gcc-pdp11-aout/5/toolchain-install

No testsuite (yet? Maybe I'd add a bit), but re-checked some Hello
World'ish code for no changes and it still runs on a SIMH pdp11.

  * config/pdp11/pdp11.h (ASM_OUTPUT_SKIP): Fix signedness warning.
  * config/pdp11/pdp11.c (pdp11_asm_print_operand_punct_valid_p):
  Remove "register" keyword.
  (pdp11_initial_elimination_offset) Remove unused variable.
  (pdp11_cmp_length) Ditto.
  (pdp11_insn_cost): Ditto, and fix signedness warning.

diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
index a21ae648439..9bc5e089f49 100644
--- a/gcc/config/pdp11/pdp11.h
+++ b/gcc/config/pdp11/pdp11.h
@@ -618,10 +618,12 @@ extern int current_first_parm_offset;
 fprintf (FILE, "\t.even\n")
 
 #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
-  if (TARGET_DEC_ASM) \
-fprintf (FILE, "\t.blkb\t%o\n", (SIZE) & 0x);  \
-  else \
-fprintf (FILE, "\t.=.+ %#o\n", (SIZE) & 0x);
+  do { \
+if (TARGET_DEC_ASM)\
+  fprintf (FILE, "\t.blkb\t%o\n", (int) ((SIZE) & 0x));\
+else   \
+  fprintf (FILE, "\t.=.+ %#o\n", (int) ((SIZE) & 0x)); \
+  } while (0)
 
 /* This says how to output an assembler line
to define a global common symbol.  */
diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c
index b663b43a29c..4cab3aee598 100644
--- a/gcc/config/pdp11/pdp11.c
+++ b/gcc/config/pdp11/pdp11.c
@@ -829,12 +829,12 @@ pdp11_asm_print_operand_punct_valid_p (unsigned char c)
 }
 
 void
-print_operand_address (FILE *file, register rtx addr)
+print_operand_address (FILE *file, rtx addr)
 {
-  register rtx breg;
+  rtx breg;
   rtx offset;
   int again = 0;
-  
+
  retry:
 
   switch (GET_CODE (addr))
@@ -1160,12 +1160,11 @@ pdp11_addr_cost (rtx addr, machine_mode mode, 
addr_space_t as ATTRIBUTE_UNUSED,
 static int
 pdp11_insn_cost (rtx_insn *insn, bool speed)
 {
-  int base_cost, i;
+  int base_cost;
   rtx pat, set, dest, src, src2;
   machine_mode mode;
-  const char *fmt;
   enum rtx_code op;
-  
+
   if (recog_memoized (insn) < 0)
 return 0;
 
@@ -1462,24 +1461,24 @@ bool
 pushpop_regeq (rtx op, int regno)
 {
   rtx addr;
-  
+
   /* False if not memory reference.  */
   if (GET_CODE (op) != MEM)
 return FALSE;
-  
+
   /* Get the address of the memory reference.  */
   addr = XEXP (op, 0);
 
   if (GET_CODE (addr) == MEM)
 addr = XEXP (addr, 0);
-
+
   switch (GET_CODE (addr))
 {
 case PRE_DEC:
 case POST_INC:
 case PRE_MODIFY:
 case POST_MODIFY:
-  return REGNO (XEXP (addr, 0)) == regno;
+  return REGNO (XEXP (addr, 0)) == (unsigned) regno;
 default:
   return FALSE;
 }
@@ -1771,8 +1770,7 @@ int
 pdp11_initial_elimination_offset (int from, int to)
 {
   /* Get the size of the register save area.  */
-  int spoff;
-  
+
   if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
 return get_frame_size ();
   else if (from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM)
@@ -2106,15 +2104,14 @@ pdp11_cmp_length (rtx *operands, int words)
 {
   rtx inops[2];
   rtx exops[4][2];
-  rtx lb[1];
   int i, len = 0;
 
   if (!reload_completed)
 return 2;
-  
+
   inops[0] = operands[0];
   inops[1] = operands[1];
-  
+
   pdp11_expand_operands (inops, exops, 2, words, NULL, big);
 
   for (i = 0; i < words; i++)


Okay for master?

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH, arc]: Drop "register" keyword

2021-05-26 Thread Jan-Benedict Glaw
Hi Jukub & Richard,

On Wed, 2021-05-26 14:47:20 +0200, Jakub Jelinek  wrote:
> On Wed, May 26, 2021 at 02:42:47PM +0200, Jan-Benedict Glaw wrote:
> > The "register" keyword was removed in C++17, remove them to get the 
> > backen
> 
> s/backend//
> 
> > to build again.
> > 
> > gcc/
> > * config/arc/arc.c (arc_address_cost, arc_print_operand_address,
> > arc_ccfsm_advance, symbolic_reference_mentioned_p,
> > arc_raw_symbolic_reference_mentioned_p): Remove  register
> 
> s/  / /
> 
> > keyword.
> 
> Ok for trunk with those nits fixed.

thanks, committed with above changes.

MfG, JBG

-- 


signature.asc
Description: PGP signature


[PATCH, arc]: Drop "register" keyword

2021-05-26 Thread Jan-Benedict Glaw
Hi!

I'd like to commit the following patch.

Okay for master?

Thanks,
  Jan-Benedict




arc: Remove useless register keyword

The "register" keyword was removed in C++17, remove them to get the backen
to build again.

gcc/
* config/arc/arc.c (arc_address_cost, arc_print_operand_address,
arc_ccfsm_advance, symbolic_reference_mentioned_p,
arc_raw_symbolic_reference_mentioned_p): Remove  register
keyword.

diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index ec7328edb5a..9153f0529ab 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -2488,8 +2488,8 @@ arc_address_cost (rtx addr, machine_mode, addr_space_t, 
bool speed)
 
 case PLUS :
   {
-   register rtx plus0 = XEXP (addr, 0);
-   register rtx plus1 = XEXP (addr, 1);
+   rtx plus0 = XEXP (addr, 0);
+   rtx plus1 = XEXP (addr, 1);
 
if (GET_CODE (plus0) != REG
&& (GET_CODE (plus0) != MULT
@@ -5032,7 +5032,7 @@ arc_print_operand (FILE *file, rtx x, int code)
 void
 arc_print_operand_address (FILE *file , rtx addr)
 {
-  register rtx base, index = 0;
+  rtx base, index = 0;
 
   switch (GET_CODE (addr))
 {
@@ -5157,7 +5157,7 @@ static void
 arc_ccfsm_advance (rtx_insn *insn, struct arc_ccfsm *state)
 {
   /* BODY will hold the body of INSN.  */
-  register rtx body;
+  rtx body;
 
   /* This will be 1 if trying to repeat the trick (ie: do the `else' part of
  an if/then/else), and things need to be reversed.  */
@@ -6130,8 +6130,8 @@ arc_legitimate_pic_addr_p (rtx addr)
 static bool
 symbolic_reference_mentioned_p (rtx op)
 {
-  register const char *fmt;
-  register int i;
+  const char *fmt;
+  int i;
 
   if (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == LABEL_REF)
 return true;
@@ -6141,7 +6141,7 @@ symbolic_reference_mentioned_p (rtx op)
 {
   if (fmt[i] == 'E')
{
- register int j;
+ int j;
 
  for (j = XVECLEN (op, i) - 1; j >= 0; j--)
if (symbolic_reference_mentioned_p (XVECEXP (op, i, j)))
@@ -6163,8 +6163,8 @@ symbolic_reference_mentioned_p (rtx op)
 bool
 arc_raw_symbolic_reference_mentioned_p (rtx op, bool skip_local)
 {
-  register const char *fmt;
-  register int i;
+  const char *fmt;
+  int i;
 
   if (GET_CODE(op) == UNSPEC)
 return false;
@@ -6184,7 +6184,7 @@ arc_raw_symbolic_reference_mentioned_p (rtx op, bool 
skip_local)
 {
   if (fmt[i] == 'E')
{
- register int j;
+ int j;
 
  for (j = XVECLEN (op, i) - 1; j >= 0; j--)
if (arc_raw_symbolic_reference_mentioned_p (XVECEXP (op, i, j),
-- 


signature.asc
Description: PGP signature


Re: [committed] amdgcn: Silence warnings in gcn.c

2021-03-18 Thread Jan-Benedict Glaw
Hi Andrew,

On Thu, 2021-03-18 17:41:59 +, Andrew Stubbs  wrote:
> gcc/ChangeLog:
> 
>   (gcn_vectorize_vec_perm_const): Ensure perm is fully uninitialized.

I guess "initialized" is ment here?

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: GCC: v850-elf

2021-03-17 Thread Jan-Benedict Glaw
Hi Nick!

On Wed, 2021-03-17 15:44:16 +, Nick Clifton  wrote:
> > However, next one is:
> 
> > ../.././gcc/defaults.h:938: error: "PREFERRED_DEBUGGING_TYPE" redefined 
> > [-Werror]
> >938 | #define PREFERRED_DEBUGGING_TYPE NO_DEBUG
> 
> Ah - this is the same as the fix needed for the RX target.  Please try the 
> attached
> patch.  It includes my original patch, your addition to the patch and a fix 
> for the
> above problem.

These three let it build.  One done.  Thanks for your support!

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: GCC: v850-elf

2021-03-17 Thread Jan-Benedict Glaw
On Tue, 2021-03-16 11:32:29 +, Nick Clifton  wrote:
> Hi Jan-Benedict,
> 
> > With my re-started testing efforts, I've got another one for you I
> > guess (`./configure --target=v850-elf && make all-gcc`):
> > 
> > ../.././gcc/config/v850/v850.c: In function ‘char* 
> > construct_restore_jr(rtx)’:
> > ../.././gcc/config/v850/v850.c:2260:22: error: ‘%s’ directive writing up to 
> > 39 bytes into a region of size between 32 and 71 [-Werror=format-overflow=]
> >   2260 |   sprintf (buff, "movhi hi(%s), r0, r6\n\tmovea lo(%s), r6, 
> > r6\n\tjmp r6",
> >|  
> > ^~~~
> >   2261 | name, name);
> >|   
> 
> I could not reproduce these in my local environment, but I suspect that
> you are using a more recent version of gcc than me.  The fix looks obvious
> however, so please could you try out the attached patch and let me know
> if it resolves the problem ?

Tried your patch, it fixes the two of four warnings. This is needed
on-top of yours:


diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index db3002a2cfb..e0e5005d865 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -2286,7 +2286,7 @@ construct_save_jarl (rtx op)
   unsigned long int first;
   unsigned long int last;
   int i;
-  static char buff [100]; /* XXX */
+  static char buff [255]; /* XXX */
   
   if (count <= (TARGET_LONG_CALLS ? 3 : 2)) 
 {



However, next one is:

g++  -fno-PIE -c  -DIN_GCC_FRONTEND -g -O2 -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute 
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. 
-I../.././gcc -I../.././gcc/. -I../.././gcc/../include 
-I../.././gcc/../libcpp/include -I../.././gcc/../libcody  
-I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/dpd 
-I../libdecnumber -I../.././gcc/../libbacktrace   -o default-d.o -MT 
default-d.o -MMD -MP -MF ./.deps/default-d.TPo ../.././gcc/config/default-d.c
In file included from ./tm_d.h:9,
 from ../.././gcc/config/default-d.c:22:
../.././gcc/defaults.h:938: error: "PREFERRED_DEBUGGING_TYPE" redefined 
[-Werror]
  938 | #define PREFERRED_DEBUGGING_TYPE NO_DEBUG
  | 
In file included from ./tm_d.h:6,
 from ../.././gcc/config/default-d.c:22:
../.././gcc/config/v850/v850.h:702: note: this is the location of the previous 
definition
  702 | #define PREFERRED_DEBUGGING_TYPE   DWARF2_DEBUG
  | 
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:2320: default-d.o] Error 1

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [BUILDROBOT] RISC-V: ‘profile_probability’ has not been declared

2017-07-13 Thread Jan-Benedict Glaw
Hi Jeff!

On Thu, 2017-07-13 14:43:52 -0600, Jeff Law <l...@redhat.com> wrote:
> On 07/13/2017 02:39 PM, Jan-Benedict Glaw wrote:
> > On Thu, 2017-06-29 14:27:41 +0200, Jan Hubicka <hubi...@ucw.cz> wrote:
> >> this is second step of the profile maintenance revamp.  It implements
> >> profile_probability type which is pretty much symmetric to profile_count
> >> except that it implements fixed point arithmetics for values 0...1.
> >> It is used to maintain probabilities of edges out of basic blocks.
> >> In addition it tracks information about quality of the estimate which can
> >> later be used for optimization.
> > 
> > RISC-V (--enable-languages=c,c++ --target=riscv32-unknown-linux-gnu
> > --without-headers --disable-threads) fails to build right now,
> > probably only missing header or header order:
> [ ... ]
> I fixed that yesterday :-)

Took me a bit to look through the logs.  Great! to see you're fixing
faster than I'd search for these small break-ups. :)

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: Alles wird gut! ...und heute wirds schon ein bißchen 
besser.
the second  :


signature.asc
Description: Digital signature


[BUILDROBOT] RISC-V: ‘profile_probability’ has not been declared (was: Convert profile probabilities to new type)

2017-07-13 Thread Jan-Benedict Glaw
Hi Jan,
hi Kito, Palmer and Andrew!

On Thu, 2017-06-29 14:27:41 +0200, Jan Hubicka <hubi...@ucw.cz> wrote:
> this is second step of the profile maintenance revamp.  It implements
> profile_probability type which is pretty much symmetric to profile_count
> except that it implements fixed point arithmetics for values 0...1.
> It is used to maintain probabilities of edges out of basic blocks.
> In addition it tracks information about quality of the estimate which can
> later be used for optimization.

RISC-V (--enable-languages=c,c++ --target=riscv32-unknown-linux-gnu
--without-headers --disable-threads) fails to build right now,
probably only missing header or header order:

[...]
g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual 
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings 
-fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc 
-I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include 
-I/home/jbglaw/repos/gcc/gcc/../libcpp/include  
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber 
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I/home/jbglaw/repos/gcc/gcc/../libbacktrace   -o riscv.o -MT riscv.o -MMD -MP 
-MF ./.deps/riscv.TPo /home/jbglaw/repos/gcc/gcc/config/riscv/riscv.c
In file included from /home/jbglaw/repos/gcc/gcc/config/riscv/riscv.c:56:0:
/home/jbglaw/repos/gcc/gcc/dojump.h:61:10: error: ‘profile_probability’ has not 
been declared
  profile_probability prob);
  ^
/home/jbglaw/repos/gcc/gcc/dojump.h:63:5: error: ‘profile_probability’ has not 
been declared
 profile_probability);
 ^
/home/jbglaw/repos/gcc/gcc/dojump.h:66:54: error: ‘profile_probability’ has not 
been declared
 extern void jumpif (tree exp, rtx_code_label *label, profile_probability prob);
  ^
/home/jbglaw/repos/gcc/gcc/dojump.h:68:9: error: ‘profile_probability’ has not 
been declared
 profile_probability);
 ^
/home/jbglaw/repos/gcc/gcc/dojump.h:73:39: error: ‘profile_probability’ has not 
been declared
rtx_code_label *if_true_label, profile_probability prob);
   ^
/home/jbglaw/repos/gcc/gcc/dojump.h:75:28: error: ‘profile_probability’ has not 
been declared
  rtx_code_label *, profile_probability);
^
/home/jbglaw/repos/gcc/gcc/dojump.h:79:28: error: ‘profile_probability’ has not 
been declared
  rtx_code_label *, profile_probability);
^
In file included from /home/jbglaw/repos/gcc/gcc/config/riscv/riscv.c:61:0:
/home/jbglaw/repos/gcc/gcc/expr.h:291:63: error: ‘profile_probability’ has not 
been declared
 extern int try_casesi (tree, tree, tree, tree, rtx, rtx, rtx, 
profile_probability);
   ^
/home/jbglaw/repos/gcc/gcc/expr.h:292:61: error: ‘profile_probability’ has not 
been declared
 extern int try_tablejump (tree, tree, tree, tree, rtx, rtx, 
profile_probability);
 ^
In file included from /home/jbglaw/repos/gcc/gcc/config/riscv/riscv.c:63:0:
/home/jbglaw/repos/gcc/gcc/optabs.h:251:10: error: ‘profile_probability’ has 
not been declared
  profile_probability prob
  ^
/home/jbglaw/repos/gcc/gcc/optabs.h:252:8: error: ‘profile_probability’ has not 
been declared
  = profile_probability::uninitialized ());
^
Makefile:2259: recipe for target 'riscv.o' failed
make[1]: *** [riscv.o] Error 1
make[1]: Leaving directory 
'/home/jbglaw/build/riscv32-unknown-linux-gnu/build-gcc/gcc'
Makefile:4286: recipe for target 'all-gcc' failed
make: *** [all-gcc] Error 2

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: They that give up essential liberty to obtain temporary safety,
the second  : deserve neither liberty nor safety.  (Ben Franklin)


signature.asc
Description: Digital signature


Re: [BUILDROBOT] error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ (was: [PATCH] [ARC] Recognise add_n and sub_n in combine again)

2017-06-25 Thread Jan-Benedict Glaw
Hi Graham,

On Mon, 2017-06-12 11:40:39 +0200, Jan-Benedict Glaw <jbg...@lug-owl.de> wrote:
> On Fri, 2017-05-12 20:14:23 +0100, Graham Markall 
> <graham.mark...@embecosm.com> wrote:
> > Since the combine pass canonicalises shift-add insns using plus and
> > ashift (as opposed to plus and mult which it previously used to do), it
> > no longer creates *add_n or *sub_n insns, as the patterns match plus and
> > mult only. The outcome of this is that some opportunities to generate
> > add{1,2,3} and sub{1,2,3} instructions are missed.
> 
> [...]
> > diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
> > index 91c28e7..42730d5 100644
> > --- a/gcc/config/arc/arc.c
> > +++ b/gcc/config/arc/arc.c
> > @@ -3483,6 +3483,14 @@ arc_print_operand (FILE *file, rtx x, int code)
> >  
> >return;
> >  
> > +case 'c':
> > +  if (GET_CODE (x) == CONST_INT)
> > +fprintf (file, "%d", INTVAL (x) );
> > +  else
> > +output_operand_lossage ("invalid operands to %%c code");
> > +
> > +  return;
> > +
> 
> 
> Build robot found something (see log at
> http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=704773),
> seems to be introduced with the above patch fragment:
> 
> g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   
> -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall 
> -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute 
> -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
> -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. 
> -I/home/jbglaw/repos-configlist_mk/gcc/gcc 
> -I/home/jbglaw/repos-configlist_mk/gcc/gcc/. 
> -I/home/jbglaw/repos-configlist_mk/gcc/gcc/../include 
> -I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libcpp/include 
> -I/opt/cfarm/mpc/include  
> -I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libdecnumber 
> -I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libdecnumber/dpd 
> -I../libdecnumber -I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libbacktrace  
>  -o arc.o -MT arc.o -MMD -MP -MF ./.deps/arc.TPo 
> /home/jbglaw/repos-configlist_mk/gcc/gcc/config/arc/arc.c
> /home/jbglaw/repos-configlist_mk/gcc/gcc/config/arc/arc.c: In function ‘void 
> arc_print_operand(FILE*, rtx, int)’:
> /home/jbglaw/repos-configlist_mk/gcc/gcc/config/arc/arc.c:3503:41: error: 
> format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long 
> int’ [-Werror=format=]
>  fprintf (file, "%d", INTVAL (x) );
>  ^
> cc1plus: all warnings being treated as errors

This still doesn't build, see the two most current builds at
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=705416
(arc-elf32, --with-cpu=arc600) and
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=705415
(arceb-linux-uclibc, --with-cpu=arc700).

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:  The course of history shows that as a government grows, liberty
the second  : decreases."  (Thomas Jefferson)


signature.asc
Description: Digital signature


[BUILDROBOT] No rule to make target '/home/jbglaw/repos/gcc/gcc/config/rs6000/e500.h', needed by 's-gtype' (was: [PATCH 01/14] rs6000: Remove TARGET_FPRS)

2017-06-12 Thread Jan-Benedict Glaw
Hi Segher!

On Tue, 2017-06-06 15:56:17 +, Segher Boessenkool 
<seg...@kernel.crashing.org> wrote:
> Since rs6000 no longer supports SPE, TARGET_FPRS now always is true.
> 
> This makes TARGET_{SF,DF}_SPE always false.  Many patterns in spe.md
> can now be deleted; which makes it possible to merge e.g. negdd2 with
> *negdd2_fpr.
> 
> Finally, e500.h is deleted (it isn't used).

A Buildrobot build from today for powerpc-rtems still seems to use it,
see build
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=704903:

g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions 
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  
-DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE -I. -Ibuild 
-I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/build 
-I/home/jbglaw/repos/gcc/gcc/../include  
-I/home/jbglaw/repos/gcc/gcc/../libcpp/include  \
-DBASEVER="\"8.0.0\"" -DDATESTAMP="\" 20170611\"" \
-DREVISION="\"\"" \
-DDEVPHASE="\" (experimental)\"" -DPKGVERSION="\"(GCC) \"" \
-DBUGURL="\"<https://gcc.gnu.org/bugs/>\"" -o build/version.o 
/home/jbglaw/repos/gcc/gcc/version.c
g++   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  
-DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE -static-libstdc++ -static-libgcc   -o 
build/gengtype \
build/gengtype.o build/errors.o build/gengtype-lex.o build/gengtype-parse.o 
build/gengtype-state.o build/version.o 
../build-x86_64-pc-linux-gnu/libiberty/libiberty.a
LC_ALL=C ; export LC_ALL ; \
gawk -f /home/jbglaw/repos/gcc/gcc/opt-gather.awk 
/home/jbglaw/repos/gcc/gcc/ada/gcc-interface/lang.opt 
/home/jbglaw/repos/gcc/gcc/brig/lang.opt 
/home/jbglaw/repos/gcc/gcc/fortran/lang.opt 
/home/jbglaw/repos/gcc/gcc/go/lang.opt /home/jbglaw/repos/gcc/gcc/lto/lang.opt 
/home/jbglaw/repos/gcc/gcc/c-family/c.opt /home/jbglaw/repos/gcc/gcc/common.opt 
/home/jbglaw/repos/gcc/gcc/config/g.opt 
/home/jbglaw/repos/gcc/gcc/config/fused-madd.opt 
/home/jbglaw/repos/gcc/gcc/config/rs6000/rs6000-tables.opt 
/home/jbglaw/repos/gcc/gcc/config/rs6000/rs6000.opt 
/home/jbglaw/repos/gcc/gcc/config/rtems.opt 
/home/jbglaw/repos/gcc/gcc/config/rs6000/sysv4.opt > tmp-optionlist
/bin/bash /home/jbglaw/repos/gcc/gcc/../move-if-change tmp-optionlist optionlist
echo timestamp > s-options
gawk -f /home/jbglaw/repos/gcc/gcc/opt-functions.awk -f 
/home/jbglaw/repos/gcc/gcc/opt-read.awk \
   -f /home/jbglaw/repos/gcc/gcc/opth-gen.awk \
   < optionlist > tmp-options.h
/bin/bash /home/jbglaw/repos/gcc/gcc/../move-if-change tmp-options.h options.h
echo timestamp > s-options-h
make[1]: *** No rule to make target 
'/home/jbglaw/repos/gcc/gcc/config/rs6000/e500.h', needed by 's-gtype'.  Stop.
make[1]: Leaving directory '/home/jbglaw/build/powerpc-rtems/build-gcc/gcc'
Makefile:4223: recipe for target 'all-gcc' failed
make: *** [all-gcc] Error 2


MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: "really soon now":  an unspecified period of time, 
likly to
the second  : be greater than any reasonable 
definition
  of "soon".


signature.asc
Description: Digital signature


[BUILDROBOT] error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ (was: [PATCH] [ARC] Recognise add_n and sub_n in combine again)

2017-06-12 Thread Jan-Benedict Glaw
On Fri, 2017-05-12 20:14:23 +0100, Graham Markall <graham.mark...@embecosm.com> 
wrote:
> Since the combine pass canonicalises shift-add insns using plus and
> ashift (as opposed to plus and mult which it previously used to do), it
> no longer creates *add_n or *sub_n insns, as the patterns match plus and
> mult only. The outcome of this is that some opportunities to generate
> add{1,2,3} and sub{1,2,3} instructions are missed.

[...]
> diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
> index 91c28e7..42730d5 100644
> --- a/gcc/config/arc/arc.c
> +++ b/gcc/config/arc/arc.c
> @@ -3483,6 +3483,14 @@ arc_print_operand (FILE *file, rtx x, int code)
>  
>return;
>  
> +case 'c':
> +  if (GET_CODE (x) == CONST_INT)
> +fprintf (file, "%d", INTVAL (x) );
> +  else
> +output_operand_lossage ("invalid operands to %%c code");
> +
> +  return;
> +


Build robot found something (see log at
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=704773),
seems to be introduced with the above patch fragment:

g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual 
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror 
-fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos-configlist_mk/gcc/gcc 
-I/home/jbglaw/repos-configlist_mk/gcc/gcc/. 
-I/home/jbglaw/repos-configlist_mk/gcc/gcc/../include 
-I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libcpp/include 
-I/opt/cfarm/mpc/include  
-I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libdecnumber 
-I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libdecnumber/dpd 
-I../libdecnumber -I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libbacktrace   
-o arc.o -MT arc.o -MMD -MP -MF ./.deps/arc.TPo 
/home/jbglaw/repos-configlist_mk/gcc/gcc/config/arc/arc.c
/home/jbglaw/repos-configlist_mk/gcc/gcc/config/arc/arc.c: In function ‘void 
arc_print_operand(FILE*, rtx, int)’:
/home/jbglaw/repos-configlist_mk/gcc/gcc/config/arc/arc.c:3503:41: error: 
format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ 
[-Werror=format=]
 fprintf (file, "%d", INTVAL (x) );
     ^
cc1plus: all warnings being treated as errors


MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: God put me on earth to accomplish a certain number of
the second  :things. Right now I am so far behind I will never die.


signature.asc
Description: Digital signature


[BUILDROBOT] Maybe uninitialized warnings in mips targets (was: [PATCH] Fix PR79345, better uninit warnings for memory)

2017-03-18 Thread Jan-Benedict Glaw
Hi Richard, Catherine, Matthew

On Thu, 2017-03-02 14:40:46 +0100, Richard Biener <rguent...@suse.de> wrote:
[...]
> On IRC we decided to wait for the TREE_NO_WARNING issue.  So the
> following is what I committed.
> 
> Bootstrapped / tested on x86_64-unknown-linux-gnu.
[...]
> 2017-03-02  Richard Biener  <rguent...@suse.de>
> 
>   PR tree-optimization/79345
>   PR c++/42000
>   * tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
>   param and abort the walk, returning -1 if it is hit.
>   (walk_aliased_vdefs): Take a limit param and pass it on.
>   * tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
>   defaulting to 0 and return a signed int.
>   * tree-ssa-uninit.c (struct check_defs_data): New struct.
>   (check_defs): New helper.
>   (warn_uninitialized_vars): Use walk_aliased_vdefs to warn
>   about uninitialized memory.
> 
>   * fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
>   bogus uninitialized warning.
>   (fixed_convert_from_real): Likewise.
> 
>   * g++.dg/warn/Wuninitialized-7.C: New testcase.
>   * c-c++-common/ubsan/bounds-2.c: Add -Wno-uninitialized.
>   * gcc.dg/uninit-pr19430-2.c: Add expected warning.

When building with config-list.mk, it seems to break for all of the
listed MIPS targets, but not on any other architecture:

[...]
g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual 
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror 
-fno-common  -DHAVE_CONFIG_H -I. -I. 
-I/scratch/4/jbglaw/configlist/repos/gcc/gcc 
-I/scratch/4/jbglaw/configlist/repos/gcc/gcc/. 
-I/scratch/4/jbglaw/configlist/repos/gcc/gcc/../include 
-I/scratch/4/jbglaw/configlist/repos/gcc/gcc/../libcpp/include 
-I/opt/cfarm/mpc/include  
-I/scratch/4/jbglaw/configlist/repos/gcc/gcc/../libdecnumber 
-I/scratch/4/jbglaw/configlist/repos/gcc/gcc/../libdecnumber/dpd 
-I../libdecnumber -I/scratch/4/jbglaw/configlist/repos/gcc/gcc/../libbacktrace  
 -o mips.o -MT mips.o -MMD -MP -MF ./.deps/mips.TPo 
/scratch/4/jbglaw/configlist/repos/gcc/gcc/config/mips/mips.c
In file included from 
/scratch/4/jbglaw/configlist/repos/gcc/gcc/hash-table.h:236:0,
 from 
/scratch/4/jbglaw/configlist/repos/gcc/gcc/coretypes.h:369,
 from 
/scratch/4/jbglaw/configlist/repos/gcc/gcc/config/mips/mips.c:26:
/scratch/4/jbglaw/configlist/repos/gcc/gcc/vec.h: In function 
‘mips_multi_member* mips_multi_add()’:
/scratch/4/jbglaw/configlist/repos/gcc/gcc/vec.h:865:3: error: ‘empty’ may be 
used uninitialized in this function [-Werror=maybe-uninitialized]
   *slot = obj;
   ^
/scratch/4/jbglaw/configlist/repos/gcc/gcc/vec.h: In function ‘void 
mips_process_sync_loop(rtx_insn*, rtx_def**)’:
/scratch/4/jbglaw/configlist/repos/gcc/gcc/vec.h:865:3: error: ‘empty’ may be 
used uninitialized in this function [-Werror=maybe-uninitialized]
   *slot = obj;
   ^
/scratch/4/jbglaw/configlist/repos/gcc/gcc/vec.h:865:3: error: ‘empty’ may be 
used uninitialized in this function [-Werror=maybe-uninitialized]
   *slot = obj;
   ^
/scratch/4/jbglaw/configlist/repos/gcc/gcc/vec.h:865:3: error: ‘empty’ may be 
used uninitialized in this function [-Werror=maybe-uninitialized]
   *slot = obj;
   ^
/scratch/4/jbglaw/configlist/repos/gcc/gcc/config/mips/mips.c: In function 
‘bool mips_expand_vec_perm_const(rtx_def**)’:
/scratch/4/jbglaw/configlist/repos/gcc/gcc/config/mips/mips.c:21362:10: error: 
‘orig_perm’ may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
   memcpy (d.perm, orig_perm, MAX_VECT_LEN);
   ~~~^
cc1plus: all warnings being treated as errors
make[2]: *** [mips.o] Error 1


See eg. all the most recent builds:
mips64el-st-linux-gnu:  
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=699675
mips64orion-elf:
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=699678
mipsisa32r2-linux-gnu:  
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=699702
mipsisa32-elfoabi:  
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=699701
mipsisa64sb1-elf:   
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=699724
mipsisa64sr71k-elf: 
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=699726
mips-netbsd:
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=699750

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: God put me on earth to accomplish a certain number of
the second  :things. Right now I am so far behind I will never die.


signature.asc
Description: Digital signature


Re: [BUILDROBOT] arm-netbsdelf: Error during -fself-test (was: [PATCH] TS_OPTIMIZATION/TS_TARGET_OPTION need no chain/type)

2017-02-28 Thread Jan-Benedict Glaw
On Mon, 2017-02-27 09:19:51 +0100, Richard Biener <rguent...@suse.de> wrote:
> On Mon, 27 Feb 2017, Jan-Benedict Glaw wrote:
> > On Wed, 2017-01-11 16:28:33 +0100, Richard Biener <rguent...@suse.de> wrote:
> > > On Wed, 11 Jan 2017, Richard Biener wrote:
> > > > LTO bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
> > > > 
> > > > (most "gross" are still TS_LIST having a type and TS_VEC having type
> > > > and chain, but that's been hard to fix with the C++ FE in place)
> > > 
> > > Forgot the tree-core.h part.
> > > 
> > > Re-bootstrapping testing on x86_64-unknown-linux-gnu.
> > > 
> > > Richard.
> > > 
> > > 2017-01-11  Richard Biener  <rguent...@suse.de>
> > > 
> > >   * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
> > >   and TS_TARGET_OPTION directly derive from TS_BASE.
> > >   * tree-core.h (tree_optimization_option): Derive from tree_base.
> > >   (tree_target_option): Likewise.
> > 
> > This caused (or uncovered) a self-test issue on arm-netbsdelf (as run
> > by config-list.mk), like in this build:
> > http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=696565
[...]
> > Reverting your patch from current HEAD lets the self-test pass. Do you
> > spot something obvious?
> 
> No, can you see which collect call in the self-test is involved?
> That is, a better backtrace, eventually when compiling the testcase
> with -O0?

Starting with selftest::run_tests(), these tests need to be run to
trigger it, all others can be omitted:

ggc_tests_c_tests ();
input_c_tests ();
gimple_c_tests ();
rtl_tests_c_tests ();
read_rtl_function_c_tests ();
--> forcibly_ggc_collect ();

In this constellation, we have on the stack:

(gdb) bt full
#0  0x008aad77 in lookup_page_table_entry (p=0x7) at 
../../gcc/gcc/ggc-page.c:635
base = 0x23649c0
L1 = 246
L2 = 320
table = 0x0
high_bits = 0
#1  0x008abe72 in ggc_set_mark (p=0x7) at ../../gcc/gcc/ggc-page.c:1532
entry = 0x76140228
bit = 23
word = 0
mask = 7730548
__FUNCTION__ = "ggc_set_mark"
#2  0x00782d27 in gt_ggc_mx_lang_tree_node (x_p=0x76140228) at 
./gt-c-c-decl.h:49
x = 0x76140228
xlimit = 0x7
__FUNCTION__ = "gt_ggc_mx_lang_tree_node"
#3  0x00784b7a in gt_ggc_mx_lang_tree_node (x_p=0x76472000) at 
./gt-c-c-decl.h:401
i1 = 8
l1 = 252
x = 0x76472000
xlimit = 0x0
__FUNCTION__ = "gt_ggc_mx_lang_tree_node"
#4  0x007849e2 in gt_ggc_mx_lang_tree_node (x_p=0x764695e8) at 
./gt-c-c-decl.h:382
x = 0x764695e8
xlimit = 0x0
__FUNCTION__ = "gt_ggc_mx_lang_tree_node"
#5  0x00782e29 in gt_ggc_mx_lang_tree_node (x_p=0x7646b6c0) at 
./gt-c-c-decl.h:68
x = 0x7646b6c0
xlimit = 0x0
__FUNCTION__ = "gt_ggc_mx_lang_tree_node"
#6  0x00af4520 in ggc_mark_root_tab (rt=0x1a19c40 
) at ../../gcc/gcc/ggc-common.c:77
i = 0
#7  0x00af45b1 in ggc_mark_roots () at ../../gcc/gcc/ggc-common.c:94
rt = 0x1990db8 <gt_ggc_rtab+120>
rtp = 0x0
rti = 0x1998850 <gt_ggc_rd_gt_c_c_decl_h+80>
i = 360777445376
#8  0x008ad064 in ggc_collect () at ../../gcc/gcc/ggc-page.c:2202
allocated_last_gc = 4194304
min_expand = 1258291.25
#9  0x00afa314 in selftest::forcibly_ggc_collect () at 
../../gcc/gcc/ggc-tests.c:36
No locals.
#10 0x0181357d in selftest::run_tests () at 
../../gcc/gcc/selftest-run-tests.c:103
start_time = 28000
finish_time = 0
elapsed_time = 9164999
#11 0x00ea352c in toplev::run_self_tests (this=0x7fffe190) at 
../../gcc/gcc/toplev.c:2048
No locals.
#12 0x00ea36d3 in toplev::main (this=0x7fffffffe190, argc=20, 
argv=0x7fffe298)
at ../../gcc/gcc/toplev.c:2125
__FUNCTION__ = "main"
#13 0x018565b2 in main (argc=20, argv=0x7fffe298) at 
../../gcc/gcc/main.c:39
toplev = {m_use_TV_TOTAL = true, m_init_signals = true}

Just for the moment, maybe more tonight.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
  Signature of:   Wenn ich wach bin, träume ich.
  the second  :


signature.asc
Description: Digital signature


[BUILDROBOT] arm-netbsdelf: Error during -fself-test (was: [PATCH] TS_OPTIMIZATION/TS_TARGET_OPTION need no chain/type)

2017-02-26 Thread Jan-Benedict Glaw
Hi Richard,

On Wed, 2017-01-11 16:28:33 +0100, Richard Biener <rguent...@suse.de> wrote:
> On Wed, 11 Jan 2017, Richard Biener wrote:
> > LTO bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
> > 
> > (most "gross" are still TS_LIST having a type and TS_VEC having type
> > and chain, but that's been hard to fix with the C++ FE in place)
> 
> Forgot the tree-core.h part.
> 
> Re-bootstrapping testing on x86_64-unknown-linux-gnu.
> 
> Richard.
> 
> 2017-01-11  Richard Biener  <rguent...@suse.de>
> 
>   * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
>   and TS_TARGET_OPTION directly derive from TS_BASE.
>   * tree-core.h (tree_optimization_option): Derive from tree_base.
>   (tree_target_option): Likewise.

This caused (or uncovered) a self-test issue on arm-netbsdelf (as run
by config-list.mk), like in this build:
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=696565

/home/jbglaw/build-configlist_mk/arm-netbsdelf/build-gcc/mk/arm-netbsdelf/./gcc/xgcc
 
-B/home/jbglaw/build-configlist_mk/arm-netbsdelf/build-gcc/mk/arm-netbsdelf/./gcc/
 -nostdinc -x c /dev/null -S -o /dev/null 
-fself-test=/home/jbglaw/repos-configlist_mk/gcc/gcc/testsuite/selftests
cc1: internal compiler error: Segmentation fault
0xaf7fdf crash_signal
/home/jbglaw/repos-configlist_mk/gcc/gcc/toplev.c:333
0x6739b3 lookup_page_table_entry
/home/jbglaw/repos-configlist_mk/gcc/gcc/ggc-page.c:635
0x6739b3 ggc_set_mark(void const*)
/home/jbglaw/repos-configlist_mk/gcc/gcc/ggc-page.c:1532
0x571bff gt_ggc_mx_lang_tree_node(void*)
./gt-c-c-decl.h:49
0x57242a gt_ggc_mx_lang_tree_node(void*)
./gt-c-c-decl.h:401
0x572fae gt_ggc_mx_lang_tree_node(void*)
./gt-c-c-decl.h:382
0x571e61 gt_ggc_mx_lang_tree_node(void*)
./gt-c-c-decl.h:391
0x83ed15 ggc_mark_root_tab
/home/jbglaw/repos-configlist_mk/gcc/gcc/ggc-common.c:77
0x83ef70 ggc_mark_roots()
/home/jbglaw/repos-configlist_mk/gcc/gcc/ggc-common.c:94
0x674417 ggc_collect()
/home/jbglaw/repos-configlist_mk/gcc/gcc/ggc-page.c:2202
0x842dff selftest::forcibly_ggc_collect()
/home/jbglaw/repos-configlist_mk/gcc/gcc/ggc-tests.c:36
0x11d0491 selftest::run_tests()
/home/jbglaw/repos-configlist_mk/gcc/gcc/selftest-run-tests.c:103
0xaf9742 toplev::run_self_tests()
/home/jbglaw/repos-configlist_mk/gcc/gcc/toplev.c:2046
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Makefile:1932: recipe for target 's-selftest' failed


Reverting your patch from current HEAD lets the self-test pass. Do you
spot something obvious?

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: They that give up essential liberty to obtain temporary safety,
the second  : deserve neither liberty nor safety.  (Ben Franklin)


signature.asc
Description: Digital signature


[BUILDROBOT] [Ada] error: alignment of array elements is greater than element size (was: [PATCH] GIMPLE store merging pass)

2016-10-29 Thread Jan-Benedict Glaw
Hi Kyrill!

On Mon, 2016-10-24 15:56:48 +0100, Kyrill Tkachov <kyrylo.tkac...@foss.arm.com> 
wrote:
> This is a slight update over [1] with Richard's feedback addressed.
> In terminate_all_aliasing_chains we now terminate the chain early if
> the destination is writing to a base offset by a variable amount.
> This avoids walking the store chain and performing more alias checks.
[...]
> Bootstrapped and tested on aarch64, arm, x86_64.

I'm getting build failures when Ada is enabled (ie. --disable-multilib
--enable-languages=all,ada,go), my build robot found it (see build
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=648226
for example):

[...]
/home/jbglaw/src/toolchain/build/./gcc/xgcc 
-B/home/jbglaw/src/toolchain/build/./gcc/ 
-B/home/jbglaw/src/toolchain/install/x86_64-pc-linux-gnu/bin/ 
-B/home/jbglaw/src/toolchain/install/x86_64-pc-linux-gnu/lib/ -isystem 
/home/jbglaw/src/toolchain/install/x86_64-pc-linux-gnu/include -isystem 
/home/jbglaw/src/toolchain/install/x86_64-pc-linux-gnu/sys-include-c -g -O2 
 -fpic  -W -Wall -gnatpg -nostdinc   a-teioed.adb -o a-teioed.o
a-teioed.adb: In function ‘Ada.Text_Io.Editing.Format_Number’:
a-teioed.adb:127:4: error: alignment of array elements is greater than element 
size
a-teioed.adb:127:4: error: alignment of array elements is greater than element 
size
a-teioed.adb:127:4: error: alignment of array elements is greater than element 
size
a-teioed.adb:127:4: error: alignment of array elements is greater than element 
size
a-teioed.adb:127:4: error: alignment of array elements is greater than element 
size
a-teioed.adb:127:4: error: alignment of array elements is greater than element 
size
a-teioed.adb:127:4: error: alignment of array elements is greater than element 
size
a-teioed.adb:127:4: error: alignment of array elements is greater than element 
size
a-teioed.adb:127:4: error: alignment of array elements is greater than element 
size
a-teioed.adb: In function ‘Ada.Text_Io.Editing.To_Picture’:
a-teioed.adb:2724:4: error: alignment of array elements is greater than element 
size
a-teioed.adb: In function ‘Ada.Text_Io.Editing.Valid’:
a-teioed.adb:2751:4: error: alignment of array elements is greater than element 
size
make[7]: *** [a-teioed.o] Error 1
make[7]: Leaving directory `/home/jbglaw/src/toolchain/build/gcc/ada/rts'
make[6]: *** [gnatlib] Error 2
make[6]: Leaving directory `/home/jbglaw/src/toolchain/build/gcc/ada'
make[5]: *** [gnatlib-shared-default] Error 2
make[5]: Leaving directory `/home/jbglaw/src/toolchain/build/gcc/ada'
make[4]: *** [gnatlib-shared-dual] Error 2
make[4]: Leaving directory `/home/jbglaw/src/toolchain/build/gcc/ada'
make[3]: *** [gnatlib-shared] Error 2
make[3]: Leaving directory `/home/jbglaw/src/toolchain/build/gcc/ada'
make[2]: *** [gnatlib-shared] Error 2
make[2]: Leaving directory 
`/home/jbglaw/src/toolchain/build/x86_64-pc-linux-gnu/libada'
make[1]: *** [all-target-libada] Error 2
make[1]: Leaving directory `/home/jbglaw/src/toolchain/build'
make: *** [all] Error 2


I bisected it down to this commit, though I don't know if it caused or
uncovered the issue.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481


signature.asc
Description: Digital signature


Re: Fix missing FALLTHRU comments

2016-09-30 Thread Jan-Benedict Glaw
On Thu, 2016-09-29 18:01:46 +0200, Marek Polacek <pola...@redhat.com> wrote:
> My upcoming fix revealed more places that were missing a fall through marker.
> 
> Bootstrapped/regtested on x86_64-linux, ppc64-linux, and aarch64-linux-gnu 
> with
> my fix, applying to trunk.
> 
> 2016-09-29  Marek Polacek  <pola...@redhat.com>
> 
>   * rtti.c (involves_incomplete_p): Add fall through comment.
> 
>   * dwarf2out.c (loc_descriptor): Add fall through comment.
>   (add_const_value_attribute): Likewise.

Maybe gcc/config/alpha/predicates.md:184, too?

/* ... fall through ...  */

This showed up on my build robot recently.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: Friends are relatives you make for yourself.
the second  :


signature.asc
Description: Digital signature


[BUILDROBOT] tic6x-uclinux: undefined reference to `gnu_libc_printf_pointer_format(tree_node*, char const**)' (was: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905))

2016-09-26 Thread Jan-Benedict Glaw
Hi Martin,

On Thu, 2016-09-08 13:03:12 -0600, Martin Sebor <mse...@gmail.com> wrote:
> Attached is another update to the patch to address the last round
> of comments and suggestions, most notably to:
[...]

with the currently committed version, the tic6x-uclinux target fails,
see ie.
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=630308 :

g++-g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  
-DHAVE_CONFIG_H -static-libstdc++ -static-libgcc  -o cc1 c/c-lang.o 
c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o 
c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o 
c/c-array-notation.o c/c-fold.o c-family/c-common.o c-family/c-cppbuiltin.o 
c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o 
c-family/c-indentation.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o 
c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o 
c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o 
c-family/c-cilkplus.o c-family/array-notation-common.o c-family/cilk.o 
c-family/c-ubsan.o default-c.o \
  cc1-checksum.o libbackend.a main.o libcommon-target.a libcommon.a 
../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a 
../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a 
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   -lmpc -lmpfr -lgmp 
-rdynamic -ldl  -L./../zlib -lz
c6x.o:(.data+0x778): undefined reference to 
`gnu_libc_printf_pointer_format(tree_node*, char const**)'
collect2: error: ld returned 1 exit status
/home/jbglaw/repos/gcc/gcc/c/Make-lang.in:84: recipe for target 'cc1' failed
make[1]: *** [cc1] Error 1
make[1]: Leaving directory '/home/jbglaw/build/tic6x-uclinux/build-gcc/gcc'
Makefile:4252: recipe for target 'all-gcc' failed
make: *** [all-gcc] Error 2


Add another one for uClibc?

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
  Signature of:  Zensur im Internet? Nein danke!
  the second  :


signature.asc
Description: Digital signature


[BUILDROBOT] vax-netbsdelf / vax-linux: ‘ELIMINABLE_REGS’ was not declared in this scope (was: [PATCH] Remove support for INITIAL_FRAME_POINTER_OFFSET)

2016-09-17 Thread Jan-Benedict Glaw
On Fri, 2016-09-09 21:40:38 +, Bernd Edlinger <bernd.edlin...@hotmail.de> 
wrote:
> Hi,
> 
> I think it is time to remove support for INITIAL_FRAME_POINTER_OFFSET, which 
> is no longer
> used by any target today.  This removes a bunch of conditional code, and 
> fixes a few bits
> in the documentation.  I'd say that part of the documentation is quite out of 
> sync, but I just
> have to stop somewhere.
> 
> 
> Bootstrapped and reg-tested on x86_64-pc-linux.gnu

The vax backend doesn't yet define ELIMINABLE_REGS.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:   Warum ist Scheiße braun? ...weil braun schon immer scheiße 
ist!
the second  :


signature.asc
Description: Digital signature


[BUILDROBOT] x86_64: Segmentation fault during -fself-test (was: Implement C _FloatN, _FloatNx types [version 6]

2016-08-22 Thread Jan-Benedict Glaw
Hi Joseph!

On Wed, 2016-08-17 20:17:07 +, Joseph Myers <jos...@codesourcery.com> wrote:
[...]
> ISO/IEC TS 18661-3:2015 defines C bindings to IEEE interchange and
> extended types, in the form of _FloatN and _FloatNx type names with
> corresponding fN/FN and fNx/FNx constant suffixes and FLTN_* / FLTNX_*
>  macros.  This patch implements support for this feature in
> GCC.

Between dee8cef0c1c1ebf85fceb5c37996ed12a2bec352 (Fri Aug 19 15:42:11
2016 +) and 82c85aba845985e55c27a7a9c448810d433adb17 (Fri Aug 19
17:43:26 2016 +), a new build regression for
x86_64-{linux,rtems,elf} showed up and I think this patch caused it.
It occurs during GCC's self-test while it's setting up it's FP types:


/scratch/4/jbglaw/regular/build/x86_64-elf/build-gcc/./gcc/xgcc 
-B/scratch/4/jbglaw/regular/build/x86_64-elf/build-gcc/./gcc/ -xc -S -c 
/dev/null -fself-test
: internal compiler error: Segmentation fault
0xb7803f crash_signal
/scratch/4/jbglaw/regular/repos/gcc/gcc/toplev.c:335
0x687952 tree_class_check
/scratch/4/jbglaw/regular/repos/gcc/gcc/tree.h:3145
0x687952 c_register_builtin_type(tree_node*, char const*)
/scratch/4/jbglaw/regular/repos/gcc/gcc/c-family/c-common.c:3876
0xeb6b36 ix86_init_builtin_types
/scratch/4/jbglaw/regular/repos/gcc/gcc/config/i386/i386.c:33351
0xeb6b36 ix86_init_builtins
/scratch/4/jbglaw/regular/repos/gcc/gcc/config/i386/i386.c:33366
0x6a8006 c_define_builtins
/scratch/4/jbglaw/regular/repos/gcc/gcc/c-family/c-common.c:5282
0x6a8006 c_common_nodes_and_builtins()
/scratch/4/jbglaw/regular/repos/gcc/gcc/c-family/c-common.c:5750
0x5ef719 c_init_decl_processing()
/scratch/4/jbglaw/regular/repos/gcc/gcc/c/c-decl.c:4097
0x63caf8 c_objc_common_init()
/scratch/4/jbglaw/regular/repos/gcc/gcc/c/c-objc-common.c:58
0x5de4c2 lang_dependent_init
/scratch/4/jbglaw/regular/repos/gcc/gcc/toplev.c:1766
0x5de4c2 do_compile
/scratch/4/jbglaw/regular/repos/gcc/gcc/toplev.c:1989
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[1]: *** [s-selftest] Error 1



See eg. build 
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=608741


MfG, JBG


-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
  Signature of:   Wenn ich wach bin, träume ich.
  the second  :


signature.asc
Description: Digital signature


Re: [BUILDROBOT] avr broken

2016-08-17 Thread Jan-Benedict Glaw
On Tue, 2016-08-16 14:26:38 -0400, Nathan Sidwell <nat...@acm.org> wrote:
> On 08/16/16 13:04, Jan-Benedict Glaw wrote:
> 
> > That'll probably work. But after all, I'm not an AVR maintainer
> > (not even an user), but just running the Build Robot.
> 
> Does your robot approve? :)

Ohoooh! See there! :)

http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=602648

The Robot has an answer. I guess that means he's okay with the patch
(of which, unfortunately, both versions didn't make it to the list.)

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:  The course of history shows that as a government grows, liberty
the second  : decreases."  (Thomas Jefferson)


signature.asc
Description: Digital signature


[BUILDROBOT] avr broken (was: [PATCH 1/4] Cherry-pick fprofile-generate-atomic from google/gcc-4_9 branch)

2016-08-13 Thread Jan-Benedict Glaw
On Fri, 2016-08-05 15:43:02 +0200, Martin Liška <mli...@suse.cz> wrote:
[...]
> Great, attaching install candidate.

> >From 0b3ac8636ef34b02e301f22c86dde0602f9969ef Mon Sep 17 00:00:00 2001
> From: marxin <mli...@suse.cz>
> Date: Thu, 28 Jul 2016 14:32:47 +0200
> Subject: [PATCH 1/4] Cherry-pick fprofile-generate-atomic from google/gcc-4_9
>  branch
> 
> gcc/ChangeLog:
> 
> 2016-08-05  Martin Liska  <mli...@suse.cz>
> 
>   Cherry picked (and modified) from google-4_7 branch
>   2012-12-26  Rong Xu  <x...@google.com>
>   * common.opt (fprofile-update): Add new flag.
>   * coretypes.h: Define enum profile_update.
>   * doc/invoke.texi: Document -fprofile-update.
>   * gcov-io.h: Declare GCOV_TYPE_ATOMIC_FETCH_ADD and
>   GCOV_TYPE_ATOMIC_FETCH_ADD_FN.
>   * tree-profile.c (gimple_init_edge_profiler): Generate
>   also atomic profiler update.
>   (gimple_gen_edge_profiler): Likewise.
[...]
> --- a/gcc/gcov-io.h
> +++ b/gcc/gcov-io.h
> @@ -164,6 +164,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. 
>  If not, see
>  #ifndef GCC_GCOV_IO_H
>  #define GCC_GCOV_IO_H
>  
> +#if LONG_LONG_TYPE_SIZE > 32
> +#define GCOV_TYPE_ATOMIC_FETCH_ADD_FN __atomic_fetch_add_8
> +#define GCOV_TYPE_ATOMIC_FETCH_ADD BUILT_IN_ATOMIC_FETCH_ADD_8
> +#else
> +#define GCOV_TYPE_ATOMIC_FETCH_ADD_FN __atomic_fetch_add_4
> +#define GCOV_TYPE_ATOMIC_FETCH_ADD BUILT_IN_ATOMIC_FETCH_ADD_4
> +#endif
> +
>  #ifndef IN_LIBGCOV
>  /* About the host */
>  

This doesn't work for AVR since their LONG_LONG_TYPE_SIZE depents on
target flags (see eg. build
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=602648)



g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual 
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings 
-fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc 
-I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include 
-I/home/jbglaw/repos/gcc/gcc/../libcpp/include  
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber 
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I/home/jbglaw/repos/gcc/gcc/../libbacktrace   -o auto-profile.o -MT 
auto-profile.o -MMD -MP -MF ./.deps/auto-profile.TPo 
/home/jbglaw/repos/gcc/gcc/auto-profile.c
In file included from ./tm.h:19:0,
 from /home/jbglaw/repos/gcc/gcc/backend.h:28,
 from /home/jbglaw/repos/gcc/gcc/auto-profile.c:26:
./options.h:261:36: error: token "." is not valid in preprocessor expressions
 #define target_flags global_options.x_target_flags
^
./options.h:5153:23: note: in expansion of macro ‘target_flags’
 #define TARGET_INT8 ((target_flags & MASK_INT8) != 0)
   ^
/home/jbglaw/repos/gcc/gcc/config/avr/avr.h:138:24: note: in expansion of macro 
‘TARGET_INT8’
 #define INT_TYPE_SIZE (TARGET_INT8 ? 8 : 16)
^
/home/jbglaw/repos/gcc/gcc/config/avr/avr.h:141:30: note: in expansion of macro 
‘INT_TYPE_SIZE’
 #define LONG_LONG_TYPE_SIZE (INT_TYPE_SIZE == 8 ? 32 : 64)
  ^
/home/jbglaw/repos/gcc/gcc/gcov-io.h:167:5: note: in expansion of macro 
‘LONG_LONG_TYPE_SIZE’
 #if LONG_LONG_TYPE_SIZE > 32
 ^
Makefile:1096: recipe for target 'auto-profile.o' failed
make[1]: *** [auto-profile.o] Error 1
make[1]: Leaving directory '/home/jbglaw/build/avr/build-gcc/gcc'


MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
the second  :


signature.asc
Description: Digital signature


Re: [BUILDROBOT] Selftest failed for i686-wrs-vxworks

2016-07-06 Thread Jan-Benedict Glaw
On Thu, 2016-06-30 16:09:23 -0400, David Malcolm <dmalc...@redhat.com> wrote:
> On Thu, 2016-06-30 at 08:38 -0400, Nathan Sidwell wrote:
> > > I haven't given it any additional manual testing so far. It's
> > > pre-installation though. Maybe I'd just set WIND_BASE to some
> > > arbitrary value, just to make xgcc pass it's initial start-up
> > > test so that it can continue with self-testing? Or shall we set
> > > some value in gcc/Makefile.in for running the self-test?
> > 
> > As I recall, WIND_BASE is expected to point at a vxworks install
> > to pick up header files.  It is an error not to have it set
> > (silently skipping it leads to user confusion).
> > 
> > If that's irrelevant for this testing environment, then setting it
> > to something (probably just "", but safer might be
> > "/These.are.not.the.dirs.you.are.looking.for") should be fine.
> 
> Sorry about the breakage.

You just uncovered it :)

> The error message appears to affect a few other targets within
> gcc/Makefile.in.

[...]
> 
> So there are at least 2 ways of fixing this:
> 
> (a) add "-nostdinc" when running the selftests i.e. to the invocations
> of GCC_FOR_TARGET in the "s-selftest" and "selftest-gdb" clauses of
> gcc/Makefile.in.
> I've verified that this fixes the issue for --target=i686-wrs-vxworks.
> 
> (b) set WIND_BASE to a dummy value in contrib/config-list.mk (if not
> already set) so that the vxworks targets are able to at least build all
> of "gcc" without needing a vxworks install.

I'd probably just do (b) and go for it. Easy, non-invasive fix.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
 Signature of:Don't believe in miracles: Rely on them!
 the second  :


signature.asc
Description: Digital signature


[BUILDROBOT] Selftest failed for i686-wrs-vxworks

2016-06-30 Thread Jan-Benedict Glaw
Hi Nathan!

The recent self-testing fails for i686-wrs-vxworks:

/home/jbglaw/build-configlist_mk/i686-wrs-vxworks/build-gcc/mk/i686-wrs-vxworks/./gcc/xgcc
 
-B/home/jbglaw/build-configlist_mk/i686-wrs-vxworks/build-gcc/mk/i686-wrs-vxworks/./gcc/
 -xc -S -c /dev/null -fself-test
xgcc: fatal error: environment variable ‘WIND_BASE’ not defined
compilation terminated.
Makefile:1877: recipe for target 's-selftest' failed
make[2]: *** [s-selftest] Error 1


That's straight out of config-list.mk, see eg. build
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=567929

I haven't given it any additional manual testing so far. It's
pre-installation though. Maybe I'd just set WIND_BASE to some
arbitrary value, just to make xgcc pass it's initial start-up test so
that it can continue with self-testing? Or shall we set some value
in gcc/Makefile.in for running the self-test?

MfG, JBG
 
-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: 17:44 <@uschebit> Evangelist ist doch ein Vertriebler
the second  :   für unverkäufliche Produkte, oder? (#korsett, 20120821)


signature.asc
Description: Digital signature


Re: [PATCH] config-list.mk AIX update

2016-06-20 Thread Jan-Benedict Glaw
Hi David,

On Mon, 2016-06-20 14:13:33 -0400, David Edelsohn <dje@gmail.com> wrote:
> This patch removes obsolete AIX 4.3, 5.1 and 5.2 configurations and
> adds AIX 7.1 configuration.  GCC does not yet differentiate AIX 7.2,
> so I did not include it.
> 
> Okay?

Of course, you're AIX maintainer after all. ;-)

  Just a nitpick: Right now, the old AIX configurations weren't marked
as --enable-obsolete targets in gcc/config.gcc .  So I suggest to add
those there as well.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
 Signature of:If it doesn't work, force it.
 the second  :   If it breaks, it needed replacing anyway.


signature.asc
Description: Digital signature


[BUILDROBOT] Selftest failed for rs6000-ibm-aix4.3

2016-06-18 Thread Jan-Benedict Glaw
Hi David, Segher, Aldy!

Davids new selftest code found something for the rs6000-ibm-aix4.3
target, maybe you're interested:

/home/jbglaw/src/toolchain/build/./gcc/xgcc 
-B/home/jbglaw/src/toolchain/build/./gcc/ -xc -S -c /dev/null -fself-test
: internal compiler error: in altivec_init_builtins, at 
config/rs6000/rs6000.c:16675
0xe0ed04 altivec_init_builtins
../../gcc/gcc/config/rs6000/rs6000.c:16675
0xe0ed04 rs6000_init_builtins
../../gcc/gcc/config/rs6000/rs6000.c:15935
0x643c7e c_define_builtins
../../gcc/gcc/c-family/c-common.c:5208
0x643c7e c_common_nodes_and_builtins()
../../gcc/gcc/c-family/c-common.c:5656
0x590c49 c_init_decl_processing()
../../gcc/gcc/c/c-decl.c:3934
0x5dd7e8 c_objc_common_init()
../../gcc/gcc/c/c-objc-common.c:58
0x580cc1 lang_dependent_init
../../gcc/gcc/toplev.c:1757
0x580cc1 do_compile
../../gcc/gcc/toplev.c:1975
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[1]: *** [s-selftest] Error 1



See eg. build
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=572874,
which is as simple as .../configure --enable-languages=c,c++
--target=rs6000-ibm-aix4.3 --without-headers --disable-threads

MfG, JBG

-- 
      Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:  Alles sollte so einfach wie möglich gemacht sein.
the second  :  Aber nicht einfacher.  (Einstein)


signature.asc
Description: Digital signature


[BUILDROBOT] MPS430 build problem due to new enum (was: [PATCH 2/2] Add edge predictions pruning)

2016-06-12 Thread Jan-Benedict Glaw
Hi Martin,

On Thu, 2016-06-09 13:24:10 +0200, Martin Liška <mli...@suse.cz> wrote:
> On 06/08/2016 02:41 PM, Jan Hubicka wrote:
> > Adding hash for this prupose is bit of an overkill (there are
> > definitly cheaper ways of solving so), but it will hardly affect compile
> > time, so the pathc is OK.
> 
> Sending the final version where I added comments and I also changed
> dump scanning to cover the new dump format.

I just noticed a build problem my Build Robot found
(http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=569576):

g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual 
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings 
-fno-common  -DHAVE_CONFIG_H -I. -I. -I/scratch/4/jbglaw/regular/repos/gcc/gcc 
-I/scratch/4/jbglaw/regular/repos/gcc/gcc/. 
-I/scratch/4/jbglaw/regular/repos/gcc/gcc/../include 
-I/scratch/4/jbglaw/regular/repos/gcc/gcc/../libcpp/include  
-I/scratch/4/jbglaw/regular/repos/gcc/gcc/../libdecnumber 
-I/scratch/4/jbglaw/regular/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I/scratch/4/jbglaw/regular/repos/gcc/gcc/../libbacktrace   -o predict.o -MT 
predict.o -MMD -MP -MF ./.deps/predict.TPo 
/scratch/4/jbglaw/regular/repos/gcc/gcc/predict.c
/scratch/4/jbglaw/regular/repos/gcc/gcc/predict.c:62:3: error: redeclaration of 
‘NONE’
   NONE,
   ^
In file included from ./options.h:8:0,
 from ./tm.h:16,
 from /scratch/4/jbglaw/regular/repos/gcc/gcc/backend.h:28,
 from /scratch/4/jbglaw/regular/repos/gcc/gcc/predict.c:33:
/scratch/4/jbglaw/regular/repos/gcc/gcc/config/msp430/msp430-opts.h:25:3: note: 
previous declaration ‘msp430_hwmult_types NONE’
   NONE,
   ^
/scratch/4/jbglaw/regular/repos/gcc/gcc/predict.c:743:23: error: could not 
convert ‘NONE’ from ‘msp430_hwmult_types’ to ‘predictor_reason’
edge ep_edge = NULL)
   ^
/scratch/4/jbglaw/regular/repos/gcc/gcc/predict.c: In function ‘void 
combine_predictions_for_insn(rtx_insn*, basic_block)’:
/scratch/4/jbglaw/regular/repos/gcc/gcc/predict.c:863:32: error: cannot convert 
‘msp430_hwmult_types’ to ‘predictor_reason’ for argument ‘5’ to ‘void 
dump_prediction(FILE*, br_predictor, int, basic_block, predictor_reason, edge)’
combined_probability, bb);
^
/scratch/4/jbglaw/regular/repos/gcc/gcc/predict.c:867:36: warning: enumeral 
mismatch in conditional expression: ‘msp430_hwmult_types’ vs ‘predictor_reason’ 
[-Wenum-compare]
  bb, !first_match ? NONE : IGNORED);
^
[...]


The new `NONE' from your enum clashes with a NONE used in a MSP430
private enum.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: They that give up essential liberty to obtain temporary safety,
the second  : deserve neither liberty nor safety.  (Ben Franklin)


signature.asc
Description: Digital signature


Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-04-04 Thread Jan-Benedict Glaw
On Fri, 2016-04-01 12:06:20 -0700, Jake Hamby <jehamby...@me.com> wrote:
> I apologize for the poor quality of the initial version of the patch
> that I submitted. I think I may have also mangled it by not

Don't apologize!  Posting work early enables others to comment on it.
GCC is a highly complex beast; nobody will produce a perfectly looking
patch on their first try.

[...]

> To be honest, my hope by sending out my work now, even in such a
> rough state, would be to try to avoid deprecating the GCC port to
> VAX, if only because: 1) there doesn't seem to be a compelling
> reason to remove support for it since it doesn't use any really old
> code paths that aren't also used by other backends (e.g. m68k and
> Atmel AVR use cc0, IBM S/390 uses non-IEEE FP formats), so it
> doesn't seem to be preventing any optimizations or code refactoring
> elsewhere in GCC that I could see, 2) even though NetBSD could
> continue to support VAX GCC, I noticed in the ChangeLogs that
> whenever somebody has made a change to a definition that affects the
> backends, they're usually very good about updating all of the
> backends so that they continue to compile, at least. So leaving the
> VAX backend in the tree would be beneficial from a maintenance
> standpoint for users of it, 3) the VAX backend is perhaps somewhat
> useful as a test case for GCC because so many unusual RTX standard
> instructions were obviously defined *for* it (although x86 defines a
> lot of them, too), although my interest is personally in preserving
> an interesting piece of computer history, and for nostalgia
> purposes.

As of now, ther VAX backend isn't near deprecation IMO. There'a
maintainer (Matt), who did quite a revamp a few years ago bringing the
VAX backend quite forward.  I also quite care for that backend and the
Build Robot I'm running is primarily(!) running to detect VAX
breakages early. (In fact, quite often Matt and I communicate over
submitted patches to the VAX backend.)

> I sent an earlier email to port-vax suggesting that future
> discussions of this project aren't relevant to gcc-patches, but I
> did want to get it on a few people's radar on the NetBSD side and
> try to solicit a bit of help on the questions I had as to how to
> avoid having to add that hack to gcc/except.c to make the optimizer
> not delete the insns. All of the other stuff can be worked on in
> NetBSD-current and avoid bothering the 99% of people who subscribe
> to gcc-patches who have no interest in the VAX backend.

You should /for sure/ bother the gcc-patches people! Please keep
Cc'ing patches to that mailing list.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:  [Nach Firefox-Update gibt es Empfehlungen, wenn man einen 
neuen Tab aufmacht.]
the second  :   13:26 <@jbglaw> "Hide the new 
tab page"
13:27 <@jbglaw> Warum zum Teufel sind gerade Kacheln so 
ungeheuer angesagt?!
  13:57 <@andrel> die Mozilla Foundation hat eine LKW Ladung 
Fugenkitt gespendet bekommen?


signature.asc
Description: Digital signature


Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-03-31 Thread Jan-Benedict Glaw
Hi Jake!

On Mon, 2016-03-28 16:34:56 -0700, Jake Hamby <jehamby...@me.com> wrote:
> Amazingly enough, my patch worked well enough that my NetBSD VAX
> kernel built with GCC 5.3 is no longer crashing. I feel pretty good
> about what I have so far so here's the complete diff for both the
> C++ exception fix and the bad condition codes optimizer bug. It
> should be good enough to check into NetBSD current, at least, and I
> believe it does fix most, if not all, of the bad code generation
> bugs with optimization on VAX.

I'd like to suggest to also Cc Matt Thomas <m...@3am-software.com>, at
least once the patch is tested with GCC trunk/HEAD/master, instead of
5.3.  There isn't probably much of a difference, but you've done
substancial and important work here, so let's see it's applicable to
upstream GCC.

  And keep in mind that a ChangeLog entry is also needed.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:   Ich hatte in letzter Zeit ein bißchen viel Realitycheck.
the second  :   Langsam möchte ich mal wieder weiterträumen können.
 -- Maximilian Wilhelm (18. Mai 2005, #lug-owl.de)


signature.asc
Description: Digital signature


Re: [PATCH, rs6000] Fix PR63354

2016-01-23 Thread Jan-Benedict Glaw
On Thu, 2016-01-21 23:42:40 -0600, Bill Schmidt <wschm...@linux.vnet.ibm.com> 
wrote:
> On Thu, 2016-01-21 at 21:21 -0600, Bill Schmidt wrote:
> > The testcase will need a slight adjustment, as currently it fails on
> > powerpc64 with -m32 testing.  Working on a fix.
> 
> This patch adjusts the gcc.target/powerpc/pr63354 test to require 64-bit
> code generation, and also restricts the test to Linux targets, as this
> is necessary for using -mprofile-kernel.  Tested on
> powerpc64-unknown-linux-gnu configured with --with-cpu=power7 and
> testing with -m32; the test is now correctly skipped there.  Is this
> okay for trunk?

Building for --target=powerpc-xilinx-eabi, I see this on my build
robot (see at the bottom of the page, the make.out artifact of build
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=483851):

g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual 
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror 
-fno-common  -DHAVE_CONFIG_H -I. -I. -I../../../gcc/gcc -I../../../gcc/gcc/. 
-I../../../gcc/gcc/../include -I../../../gcc/gcc/../libcpp/include 
-I/opt/cfarm/mpc/include  -I../../../gcc/gcc/../libdecnumber 
-I../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I../../../gcc/gcc/../libbacktrace   -o rs6000.o -MT rs6000.o -MMD -MP -MF 
./.deps/rs6000.TPo ../../../gcc/gcc/config/rs6000/rs6000.c
../../../gcc/gcc/config/rs6000/rs6000.c:26243:1: error: ‘bool 
rs6000_keep_leaf_when_profiled()’ defined but not used [-Werror=unused-function]
 rs6000_keep_leaf_when_profiled ()
 ^~

cc1plus: all warnings being treated as errors
Makefile:2121: recipe for target 'rs6000.o' failed
make[2]: *** [rs6000.o] Error 1
make[2]: Leaving directory 
'/home/jbglaw/build-configlist_mk/powerpc-xilinx-eabi/build-gcc/mk/powerpc-xilinx-eabi/gcc'
Makefile:4123: recipe for target 'all-gcc' failed
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory 
'/home/jbglaw/build-configlist_mk/powerpc-xilinx-eabi/build-gcc/mk/powerpc-xilinx-eabi'


MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:  Träume nicht von Deinem Leben: Lebe Deinen Traum!
the second  :


signature.asc
Description: Digital signature


config-list.mk and obsoleted configurations (was: [BUILDROBOT] "error: null argument where non-null required" on multiple targets)

2015-12-17 Thread Jan-Benedict Glaw
On Thu, 2015-12-17 11:05:42 -0700, Jeff Law <l...@redhat.com> wrote:
> On 12/16/2015 03:46 AM, Jan-Benedict Glaw wrote:
> > Shall I bisect one of the cases anew, with the "Test value of
> > _GLIBCXX_USE_C99_WCHAR not whether it is defined" patch that
> > uncovered it, applied? Starting with some arbitrary old revision?
> Yes.  I'd really like to see config-list.mk working again.  The
> first step is always building a test the developers can easily work
> with.

Will do. Have a good starting point?

  Oh, there are some targets that were obsoleted today. I think the
OpenBSD3 and the two knetbsd configurations will need an
--enable-obsolete. I suggest this (untested) patch:

contrib/
2015-12-17  Jan-Benedict Glaw  <jbg...@lug-owl.de>

* config-list.mk (LIST): Add --enable-obsolete to recently obsoleted
targets x86_64-knetbsd-gnu, i686-knetbsd-gnu and i686-openbsd3.0 .

diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 8d39e68..ab8060b 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-17  Jan-Benedict Glaw  <jbg...@lug-owl.de>
+
+   * config-list.mk (LIST): Add --enable-obsolete to recently obsoleted
+   targets x86_64-knetbsd-gnu, i686-knetbsd-gnu and i686-openbsd3.0 .
+
 2015-12-06  Tobias Burnus  <bur...@net-b.de>
 
* download_prerequisites: Download ISL 0.15 instead of 0.14.
diff --git a/contrib/config-list.mk b/contrib/config-list.mk
index f0e39d6..0f15464 100644
--- a/contrib/config-list.mk
+++ b/contrib/config-list.mk
@@ -28,7 +28,8 @@ LIST = aarch64-elf aarch64-linux-gnu \
   hppa64-hpux11.0OPT-enable-sjlj-exceptions=yes hppa2.0-hpux11.9 \
   i686-pc-linux-gnu i686-apple-darwin i686-apple-darwin9 i686-apple-darwin10 \
   i486-freebsd4 i686-freebsd6 i686-kfreebsd-gnu \
-  i686-netbsdelf9 i686-knetbsd-gnu i686-openbsd i686-openbsd3.0 \
+  i686-netbsdelf9 i686-knetbsd-gnuOPT-enable-obsolete \
+  i686-openbsd i686-openbsd3.0OPT-enable-obsolete \
   i686-elf i686-kopensolaris-gnu i686-symbolics-gnu i686-pc-msdosdjgpp \
   i686-lynxos i686-nto-qnx \
   i686-rtems i686-solaris2.10 i686-wrs-vxworks \
@@ -74,7 +75,7 @@ LIST = aarch64-elf aarch64-linux-gnu \
   vax-netbsdelf vax-openbsd visium-elf x86_64-apple-darwin \
   x86_64-pc-linux-gnuOPT-with-fpmath=avx \
   x86_64-elfOPT-with-fpmath=sse x86_64-freebsd6 x86_64-netbsd \
-  x86_64-knetbsd-gnu x86_64-w64-mingw32 \
+  x86_64-knetbsd-gnuOPT-enable-obsolete x86_64-w64-mingw32 \
   x86_64-mingw32OPT-enable-sjlj-exceptions=yes xstormy16-elf xtensa-elf \
   xtensa-linux \
   i686-interix3OPT-enable-obsolete



MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: 23:53 <@jbglaw> So, ich kletter' jetzt mal ins Bett.
the second  : 23:57 <@jever2> .oO( kletter ..., hat er noch Gitter vorm Bett, 
wie früher meine Kinder?)
  00:00 <@jbglaw> jever2: *patsch*
  00:01 <@jever2> *aua*, wofür, Gedanken sind frei!
  00:02 <@jbglaw> Nee, freie Gedanken, die sind seit 1984 doch aus!
  00:03 <@jever2> 1984? ich bin erst seit 1985 verheiratet!


signature.asc
Description: Digital signature


  1   2   3   >