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


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] 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] 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: 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: [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


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-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: [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 build/g

[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


[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


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] 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


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: [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


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 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 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


[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: 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


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: [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: [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


[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 
25

[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 = &mips_cpu_info_table[mips_isa_option];


Committed as obvious.

MfG, JBG

-- 


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


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


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], &highpart, &lowpart);
> -   else
> - split_double (operands[1], &lowpart, &highpart);
> -   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: [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: [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] 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


[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-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] 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


[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


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


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


[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-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


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


[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 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] 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] 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


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] 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!

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


[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


[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


[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: [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/&d/
> 
> > 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


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


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


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


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 namespa

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] 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] 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 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: [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 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


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
/var/lib/laminar/run/gcc-m32rle-elf/21/toolchain-build/./gcc

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


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 &fi) const override
> +  {
> +return fi.scalar_type (0);
> +  }
> +
> +  machine_mode
> +  memory_vector_mode (const function_instance &fi) 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 00/11] CodeView variables and type system

2024-08-12 Thread Jan-Benedict Glaw
On Tue, 2024-06-18 01:17:02 +0100, Mark Harmstone  wrote:
> This patch series adds support for outputting global variables when the
> -gcodeview option is provided, along with the type system to go along
> with this.
[...]
> This ought to be fairly complete as far as C is concerned. Still to come
> are functions, local variables, and some C++ things.
[...]
>  gcc/dwarf2codeview.cc | 2278 -
>  gcc/dwarf2codeview.h  |   67 ++
>  gcc/dwarf2out.cc  |5 +
>  3 files changed, 2341 insertions(+), 9 deletions(-)

Building with a really recent GCC on the host for
--target=i686-mingw32crt or --target=i686-cygwin --enable-threads=yes,
I get these new warnings (--enable-werror-always is in place):


[all 2024-08-12 14:21:54] 
/var/lib/laminar/run/gcc-i686-mingw32crt/58/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  -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 dwarf2codeview.o -MT 
dwarf2codeview.o -MMD -MP -MF ./.deps/dwarf2codeview.TPo 
../../gcc/gcc/dwarf2codeview.cc
[all 2024-08-12 14:22:00] In function 'uint32_t 
get_type_num_enumeration_type(dw_die_ref, bool)',
[all 2024-08-12 14:22:00] inlined from 'uint32_t get_type_num(dw_die_ref, 
bool, bool)' at ../../gcc/gcc/dwarf2codeview.cc:3227:43:
[all 2024-08-12 14:22:00] ../../gcc/gcc/dwarf2codeview.cc:2576:58: error: 
'last_type' may be used uninitialized [-Werror=maybe-uninitialized]
[all 2024-08-12 14:22:00]  2576 | 
ct->lf_fieldlist.last_subtype->lf_index.type_num = last_type;
[all 2024-08-12 14:22:00]   | 
~^~~
[all 2024-08-12 14:22:00] ../../gcc/gcc/dwarf2codeview.cc: In function 
'uint32_t get_type_num(dw_die_ref, bool, bool)':
[all 2024-08-12 14:22:00] ../../gcc/gcc/dwarf2codeview.cc:2451:12: note: 
'last_type' was declared here
[all 2024-08-12 14:22:00]  2451 |   uint32_t last_type;
[all 2024-08-12 14:22:00]   |^
[all 2024-08-12 14:22:00] In function 'uint32_t get_type_num_struct(dw_die_ref, 
bool, bool*)',
[all 2024-08-12 14:22:00] inlined from 'uint32_t get_type_num(dw_die_ref, 
bool, bool)' at ../../gcc/gcc/dwarf2codeview.cc:3233:33:
[all 2024-08-12 14:22:00] ../../gcc/gcc/dwarf2codeview.cc:2876:60: error: 
'last_type' may be used uninitialized [-Werror=maybe-uninitialized]
[all 2024-08-12 14:22:00]  2876 |   
ct->lf_fieldlist.last_subtype->lf_index.type_num = last_type;
[all 2024-08-12 14:22:00]   |   
~^~~
[all 2024-08-12 14:22:00] ../../gcc/gcc/dwarf2codeview.cc: In function 
'uint32_t get_type_num(dw_die_ref, bool, bool)':
[all 2024-08-12 14:22:00] ../../gcc/gcc/dwarf2codeview.cc:2729:12: note: 
'last_type' was declared here
[all 2024-08-12 14:22:00]  2729 |   uint32_t last_type;
[all 2024-08-12 14:22:00]   |^
[all 2024-08-12 14:22:00] cc1plus: all warnings being treated as errors
[all 2024-08-12 14:22:00] make[1]: *** [Makefile:1194: dwarf2codeview.o] Error 1
[all 2024-08-12 14:22:00] make[1]: Leaving directory 
'/var/lib/laminar/run/gcc-i686-mingw32crt/58/toolchain-build/gcc'
[all 2024-08-12 14:22:00] make: *** [Makefile:4698: all-gcc] Error 2

Full build logs at
http://toolchain.lug-owl.de/laminar/jobs/gcc-i686-mingw32crt/58 and
http://toolchain.lug-owl.de/laminar/jobs/gcc-i686-cygwinOPT-enable-threads=yes/53
 .

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: [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


[Ping] VAX: Fix ICE during operand output

2013-08-21 Thread Jan-Benedict Glaw
On Wed, 2013-07-31 18:34:26 +0200, Jan-Benedict Glaw  wrote:
> Hi!
> 
> We've seen ICEs while outputting an operand (not even the excessive
> CISC of a VAX could do that), which should be fixed by this patch:
> 
> 2013-07-31  Jan-Benedict Glaw  
> 
>   * config/vax/constraints.md (T): Add missing CONSTANT_P check.

Ping?

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


Re: [Patch] Rewrite regex matchers

2013-08-30 Thread Jan-Benedict Glaw
On Fri, 2013-08-30 15:36:03 +0200, Jakub Jelinek  wrote:
> On Fri, Aug 30, 2013 at 03:26:59PM +0200, Paolo Carlini wrote:
> > On 08/30/2013 02:05 PM, Tim Shen wrote:
> > >+  const _TraitsT&_M_traits;
> > >+  _FlagT _M_flags;
> > >+  bool   _M_is_non_matching;
> > >+  std::set<_CharT>   _M_char_set;
> > >+  std::set> _M_range_set;
> > >+  _CharClassT_M_class_set;
> > another, very general comment: now that nothing is decided ABI-wise
> > for these features, let's pay attention to the layouts, let's make
> > sure that the data members are ordered in the best way to minimize
> > the size. For example, when I see a bool sandwiched between big
> > objects something seems at least weird... Let's make measurements
> > and optimize for 64-bit but let's double check on 32-bit too.
> 
> You could use pahole utility from dwarves for this, though not sure how far
> it is with support for DWARF4 and extensions recent gcc emit, so perhaps you
> need -gdwarf-3 -gstrict-dwarf or similar.

But please keep in mind that size is not everything. Cachelines count,
too! If you save four or eight bytes off of a stackframe (or struct or
whatever), but sacrifice a cacheline or two to access badly layouted
variables in eg. a long-running loop, you even lost performance.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:  GDB has a 'break' feature; why doesn't it have 'fix' too?
the second  :


signature.asc
Description: Digital signature


[Ping^2 PATCH] VAX: Fix ICE during operand output

2013-09-13 Thread Jan-Benedict Glaw
On Wed, 2013-07-31 18:34:26 +0200, Jan-Benedict Glaw  wrote:
> We've seen ICEs while outputting an operand (not even the excessive
> CISC of a VAX could do that), which should be fixed by this patch:
> 
> 2013-07-31  Jan-Benedict Glaw  
> 
>   * config/vax/constraints.md (T): Add missing CONSTANT_P check.
> 
> diff --git a/gcc/config/vax/constraints.md b/gcc/config/vax/constraints.md
> index a4774d4..66d6bf0 100644
> --- a/gcc/config/vax/constraints.md
> +++ b/gcc/config/vax/constraints.md
> @@ -114,5 +114,6 @@
>  
>  (define_constraint "T"
>  "@internal satisfies CONSTANT_P and, if pic is enabled, is not a 
> SYMBOL_REF, LABEL_REF, or CONST."
> -   (ior (not (match_code "const,symbol_ref,label_ref"))
> - (match_test "!flag_pic")))
> +  (and (match_test ("CONSTANT_P (op)"))
> +   (ior (not (match_code "symbol_ref,label_ref,const"))
> + (match_test "!flag_pic"
> 
> Even the description got it right :)  Thanks to Will Deacon for
> debugging this.
> 
> Ok?

Ping^2

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] [PATCH] r202527: ssa / ssanames restructure broke alpha-linux

2013-09-14 Thread Jan-Benedict Glaw
Hi!

My Build Robot[1] found this recent commit to break Alpha:

* tree-flow.h (FREE_SSANAMES): Move to tree-ssanames.c
(SSANAMES, MODIFIED_NORETURN_CALLS, DEFAULT_DEFS, ptr_info_def,
num_ssa_names, ssa_name): Move to tree-ssanames.h + prototypes.
* tree-flow-inline.h (make_ssa_name, copy_ssa_name, duplicate_ssa_name,
make_temp_ssa_name): move to tree-ssanames.h
* tree-ssa-alias.h: Move prototype.
* tree-ssa.h: Include tree-ssanames.h.
* tree-ssanames.c (FREE_SSANAMES): Move to here.
* tree-ssanames.h: New.  Move items from tree-flow*.h
* Makefile.in (tree-ssanames.h): Add to tree-ssanames.o and GTFILES.

See for example this build log:
http://toolchain.lug-owl.de/buildbot/showlog.php?id=11663&mode=view

I suggest this patch, which fixes an alpha-linux build for me:

2013-09-13  Jan-Benedict Glaw  

* config/alpha.c: Include tree-ssa.h.

diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index a8fb929..3759205 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "splay-tree.h"
 #include "gimple.h"
 #include "tree-flow.h"
+#include "tree-ssa.h"
 #include "tree-stdarg.h"
 #include "tm-constrs.h"
 #include "df.h"


Ok?

MfG, JBG

[1] http://toolchain.lug-owl.de/buildbot/
    http://toolchain.lug-owl.de/buildbot/timeline.php
-- 
  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


Re: [buildrobot] [PATCH] r202527: ssa / ssanames restructure broke alpha-linux

2013-09-16 Thread Jan-Benedict Glaw
On Mon, 2013-09-16 13:01:40 +0200, Uros Bizjak  wrote:
> On Mon, Sep 16, 2013 at 11:06 AM, Uros Bizjak  wrote:
> > > My Build Robot[1] found this recent commit to break Alpha:
> 
> I think you can remove the tree-flow.h include and you need to update the
> dependencies in gcc/Makefile.in.
> 
> However, we still need tree-flow.h, but instead of tree-ssa.h, we can
> include tree-ssanames.h:
> 
> I will commit attached  incremental patch, once bootstrap finish.

Please don't forget the dep's in gcc/Makefile.in as mentioned above.

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


[PATCH] target/56875: Work around buggy GAS

2013-09-20 Thread Jan-Benedict Glaw
Hi!

VAX GAS has a glitch when generating a 64bit value from a small
negative integer, which isn't properly sign-extended. (I'll see if
this can be fixed without breaking other cases.)

However, GCC should work around this by simply using the already
prepared formatting operand code 'D'.  The patch also introduces a new
vax.exp fragment (under gcc.target).

Ok?

diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c
index 53189a7..6b643d1 100644
--- a/gcc/config/vax/vax.c
+++ b/gcc/config/vax/vax.c
@@ -1187,7 +1187,7 @@ vax_output_int_move (rtx insn ATTRIBUTE_UNUSED, rtx 
*operands,
{
  operands[1] = GEN_INT (lval);
  operands[2] = GEN_INT (n);
- return "ashq %2,%1,%0";
+ return "ashq %2,%D1,%0";
}
 #if HOST_BITS_PER_WIDE_INT == 32
}
@@ -1199,7 +1199,7 @@ vax_output_int_move (rtx insn ATTRIBUTE_UNUSED, rtx 
*operands,
{
  operands[1] = GEN_INT (hval >> n);
  operands[2] = GEN_INT (n + 32);
- return "ashq %2,%1,%0";
+ return "ashq %2,%D1,%0";
 #endif
}
}
diff --git a/gcc/config/vax/vax.md b/gcc/config/vax/vax.md
index eadde18..2c05d00 100644
--- a/gcc/config/vax/vax.md
+++ b/gcc/config/vax/vax.md
@@ -697,14 +697,14 @@
(ashift:DI (match_operand:DI 1 "general_operand" "g")
   (match_operand:QI 2 "general_operand" "g")))]
   ""
-  "ashq %2,%1,%0")
+  "ashq %2,%D1,%0")
 
 (define_insn ""
   [(set (match_operand:DI 0 "nonimmediate_operand" "=g")
(ashiftrt:DI (match_operand:DI 1 "general_operand" "g")
 (neg:QI (match_operand:QI 2 "general_operand" "g"]
   ""
-  "ashq %2,%1,%0")
+  "ashq %2,%D1,%0")
 
 ;; We used to have expand_shift handle logical right shifts by using extzv,
 ;; but this make it very difficult to do lshrdi3.  Since the VAX is the
diff --git a/gcc/testsuite/gcc.target/vax/pr56875.c 
b/gcc/testsuite/gcc.target/vax/pr56875.c
new file mode 100644
index 000..f409afe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/vax/pr56875.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+/* { dg-final { scan-assembler "ashq .*,\\\$0x," } } */
+/* { dg-final { scan-assembler-not "ashq .*,\\\$-1," } } */
+
+void
+a (void)
+{
+   unsigned long i = 1;
+   unsigned long long v;
+
+   v = ~ (unsigned long long) 0 << i;
+}
diff --git a/gcc/testsuite/gcc.target/vax/vax.exp 
b/gcc/testsuite/gcc.target/vax/vax.exp
new file mode 100644
index 000..2aec4ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/vax/vax.exp
@@ -0,0 +1,41 @@
+# Copyright (C) 2013 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't a VAX target.
+if ![istarget vax-*-*] then {
+  return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+   "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish


MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
  Signature of:Lauf nicht vor Deinem Glück davon:
  the second  : Es könnte hinter Dir stehen!


signature.asc
Description: Digital signature


Re: [PATCH] target/56875: Work around buggy GAS

2013-09-20 Thread Jan-Benedict Glaw
On Fri, 2013-09-20 18:58:23 +0200, Jan-Benedict Glaw  wrote:
> VAX GAS has a glitch when generating a 64bit value from a small
> negative integer, which isn't properly sign-extended. (I'll see if
> this can be fixed without breaking other cases.)
> 
> However, GCC should work around this by simply using the already
> prepared formatting operand code 'D'.  The patch also introduces a new
> vax.exp fragment (under gcc.target).
> 
> Ok?
[...]

Forgot the ChangeLog entry:

PR56875:
2013-09-20  Martin Husemann  
Jan-Benedict Glaw  

gcc/
* config/vax/vax.c (vax_output_int_move): Use D format specifier.
* config/vax/vax.md (ashldi3, ): Ditto

gcc/testsuite/
* gcc.target/vax/vax.exp: New.
* gcc.target/vax/pr56875.c: Ditto.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
 Signature of:  http://perl.plover.com/Questions.html
 the second  :


signature.asc
Description: Digital signature


[PATCH] Silence an unused variable warning

2013-09-20 Thread Jan-Benedict Glaw
Hi!

With the VAX target, I see this warning:

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 -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -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/../libdecnumber -I../../../../gcc/gcc/../libdecnumber/dpd 
-I../libdecnumber -I../../../../gcc/gcc/../libbacktrace
../../../../gcc/gcc/lra-eliminations.c -o lra-eliminations.o
../../../../gcc/gcc/lra-eliminations.c: In function ‘void init_elim_table()’:
../../../../gcc/gcc/lra-eliminations.c:1162:8: warning: unused variable 
‘value_p’ [-Wunused-variable]
   bool value_p;
^

This is because we don't eliminate any registers (beyond GCC's
internal default). Fixed by moving this variable into the #ifdef block
to which it belongs.


2013-09-20  Jan-Benedict Glaw  

gcc/
* lra-eliminations.c (update_reg_eliminate): Guard value_p.


diff --git a/gcc/lra-eliminations.c b/gcc/lra-eliminations.c
index f2a5751..c332575 100644
--- a/gcc/lra-eliminations.c
+++ b/gcc/lra-eliminations.c
@@ -1159,9 +1159,9 @@ update_reg_eliminate (bitmap insns_with_changed_offsets)
 static void
 init_elim_table (void)
 {
-  bool value_p;
   struct elim_table *ep;
 #ifdef ELIMINABLE_REGS
+  bool value_p;
   const struct elim_table_1 *ep1;
 #endif
 
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


[ping] [PATCH] Silence an unused variable warning

2013-09-26 Thread Jan-Benedict Glaw
On Fri, 2013-09-20 20:51:37 +0200, Jan-Benedict Glaw  wrote:
> Hi!
> 
> With the VAX target, I see this warning:
> 
> 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 -pedantic 
> -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -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/../libdecnumber 
> -I../../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
> -I../../../../gcc/gcc/../libbacktrace
> ../../../../gcc/gcc/lra-eliminations.c -o lra-eliminations.o
> ../../../../gcc/gcc/lra-eliminations.c: In function ‘void init_elim_table()’:
> ../../../../gcc/gcc/lra-eliminations.c:1162:8: warning: unused variable 
> ‘value_p’ [-Wunused-variable]
>bool value_p;
> ^
[...]

Ping:

http://gcc.gnu.org/ml/gcc-patches/2013-09/msg01568.html
`--> http://gcc.gnu.org/ml/gcc-patches/2013-09/txtnrNwaGiD3x.txt

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: Gib Dein Bestes. Dann übertriff Dich selbst!
the second  :


signature.asc
Description: Digital signature


[RFC] Change dependency-generating compiler from $(CC) to $(CXX) in gcc/

2013-10-01 Thread Jan-Benedict Glaw
Hi!

I'm trying to build GCC on an AIX ppc system (gcc111.fsffrance.org),
where IBM's XL C compiler is installed, but not XL C++. So my
configury uses CC=/usr/bin/xlC, and a default value (g++) for CXX.

  Because $CC is used for dependency checking (gcc/configure.ac::977
or gcc/configure:8765), `depcomp' detects "aix" style dependency
generation, but that'll fail because g++ is actually used for
compilation. (This will result in all the .o files containing
dependency information.)

  Since we're using $(CXX) instead of $(CC) these days, I suggest
using CXX instead of CC. A quick check (without regenerating all
configure and Makefile files just changing CC to CXX in gcc/configure)
makes it build properly. (If done properly, some variables will change
their name s/CC/CXX/, so that must be changed in some more files if
done properly.)

  There are, however, some more directories (other than gcc/) that
might be equally affected: Searching for CCDEPMODE also reveals:

* boehm-gc
* libatomic
* libcpp
* libffi
* libgfortran
* libgo
* libgomp
* libitm
* libjava
* libmudflap
* libquadmath
* libsanitizer
* libssp
* libvtv
* lto-plugin
* zlib

I haven't checked these (if they're build with CC or CXX), but those
which use CXX (if there are any) should probably also be changed.

  My basic question though is: Shall I cook up a patch to do the
proper transition from CC to CXX for dependency generation? Or better
keep it as is (which I consider broken, but probably few people will
ever experience that problem)?

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


[RFC] [PATCH] Change dependency-generating compiler from $(CC) to $(CXX) in gcc/

2013-10-01 Thread Jan-Benedict Glaw
On Tue, 2013-10-01 20:49:30 +0200, Jan-Benedict Glaw  wrote:
[...]
>   Since we're using $(CXX) instead of $(CC) these days, I suggest
> using CXX instead of CC. A quick check (without regenerating all
> configure and Makefile files just changing CC to CXX in gcc/configure)
> makes it build properly. (If done properly, some variables will change
> their name s/CC/CXX/, so that must be changed in some more files if
> done properly.)

For gcc/, I prepared this patch, which seems to work:


2013-10-01  Jan-Benedict Glaw  

gcc/
* configure.ac: Use CXX instead of CC for dependency generation.
* Makefile.in: Change CCDEPMODE to CXXDEPMODE.
* configure: Regenerate.

diff --git a/gcc/configure.ac b/gcc/configure.ac
index f216962..105c534 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -974,7 +974,7 @@ AC_CONFIG_COMMANDS([gccdepdir],[
   ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs $lang/$DEPDIR
   done], [subdirs="$subdirs" ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR])
 
-ZW_PROG_COMPILER_DEPENDENCIES([CC])
+ZW_PROG_COMPILER_DEPENDENCIES([CXX])
 AC_LANG_POP(C++)
 
 # diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index f55f1d1..9a6369e 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -309,7 +309,7 @@ write_entries_to_file = $(shell rm -f $(2) || :) $(shell 
touch $(2)) \
 # 
 
 # Dependency tracking stuff.
-CCDEPMODE = @CCDEPMODE@
+CXXDEPMODE = @CXXDEPMODE@
 DEPDIR = @DEPDIR@
 depcomp = $(SHELL) $(srcdir)/../depcomp
 
@@ -1029,7 +1029,7 @@ INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
   $(CLOOGINC) $(ISLINC)
 
 COMPILE.base = $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) -o $@
-ifeq ($(CCDEPMODE),depmode=gcc3)
+ifeq ($(CXXDEPMODE),depmode=gcc3)
 # Note a subtlety here: we use $(@D) for the directory part, to make
 # things like the go/%.o rule work properly; but we use $(*F) for the
 # file part, as we just want the file part of the stem, not the entire
@@ -1038,7 +1038,7 @@ COMPILE = $(COMPILE.base) -MT $@ -MMD -MP -MF 
$(@D)/$(DEPDIR)/$(*F).TPo
 POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(*F).TPo $(@D)/$(DEPDIR)/$(*F).Po
 else
 COMPILE = source='$<' object='$@' libtool=no \
-DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) $(COMPILE.base)
+DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) $(COMPILE.base)
 POSTCOMPILE =
 endif
 
diff --git a/gcc/configure b/gcc/configure
index 2ac0347..0ca79bd 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -735,7 +735,7 @@ LDEXP_LIB
 EXTRA_GCC_LIBS
 GNAT_LIBEXC
 COLLECT2_LIBS
-CCDEPMODE
+CXXDEPMODE
 DEPDIR
 am__leading_dot
 CXXCPP
@@ -8762,12 +8762,12 @@ ac_config_commands="$ac_config_commands depdir"
 ac_config_commands="$ac_config_commands gccdepdir"
 
 
-depcc="$CC"   am_compiler_list=
+depcc="$CXX"  am_compiler_list=
 
 am_depcomp=$ac_aux_dir/depcomp
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" 
>&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   if test -f "$am_depcomp"; then
@@ -8789,7 +8789,7 @@ else
   # directory.
   mkdir sub
 
-  am_cv_CC_dependencies_compiler_type=none
+  am_cv_CXX_dependencies_compiler_type=none
   if test "$am_compiler_list" = ""; then
  am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
@@ -8834,7 +8834,7 @@ else
   #   icc: Command line remark: option '-MP' not supported
   if (grep 'ignoring option' conftest.err ||
   grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-am_cv_CC_dependencies_compiler_type=$depmode
+am_cv_CXX_dependencies_compiler_type=$depmode
$as_echo "$as_me:$LINENO: success" >&5
 break
   fi
@@ -8846,15 +8846,15 @@ else
   cd ..
   rm -rf conftest.dir
 else
-  am_cv_CC_dependencies_compiler_type=none
+  am_cv_CXX_dependencies_compiler_type=none
 fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+if test x${am_cv_CXX_dependencies_compiler_type-none} = xnone
 then as_fn_error "no usable dependency style found" "$LINENO" 5
-else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+else CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
 
 fi
 


-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: Gib Dein Bestes. Dann übertriff Dich selbst!
the second  :


signature.asc
Description: Digital signature


[PATCH, COMMITTED] Fix comment in gcc/config/sh/sh.c

2012-10-18 Thread Jan-Benedict Glaw
Hi!

This patch silences the following warning:

../../../../gcc/gcc/config/sh/sh.c:9455:1: warning: "/*" within comment 
[-Wcomment]

Comitted as obvious.

MfG, JBG




2012-10-18  Jan-Benedict Glaw  

gcc/
* config/sh/sh.c: Fix comment to silence warning.


diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index b81c0c3..4d65685 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -9452,7 +9452,7 @@ sh_insert_attributes (tree node, tree *attributes)
 }
 
 
/*--
-/* Target specific attributes
+  Target specific attributes
   Supported attributes are:
 
* interrupt_handler
-- 
  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] r203314..r203320: ssa / ssanames restructure broke alpha-linux again

2013-10-10 Thread Jan-Benedict Glaw
Hi!

On Mon, 2013-09-16 10:32:24 -0400, Andrew MacLeod  wrote:
> On 09/16/2013 05:05 AM, Richard Biener wrote:
> > On Sat, Sep 14, 2013 at 12:41 PM, Jan-Benedict Glaw  
> > wrote:
> > >My Build Robot[1] found this recent commit to break Alpha:
> > >
> > > * tree-flow.h (FREE_SSANAMES): Move to tree-ssanames.c
> > > (SSANAMES, MODIFIED_NORETURN_CALLS, DEFAULT_DEFS, ptr_info_def,
> > > num_ssa_names, ssa_name): Move to tree-ssanames.h + prototypes.
> > > * tree-flow-inline.h (make_ssa_name, copy_ssa_name, 
> > > duplicate_ssa_name,
> > > make_temp_ssa_name): move to tree-ssanames.h
> > > * tree-ssa-alias.h: Move prototype.
> > > * tree-ssa.h: Include tree-ssanames.h.
> > > * tree-ssanames.c (FREE_SSANAMES): Move to here.
> > > * tree-ssanames.h: New.  Move items from tree-flow*.h
> > > * Makefile.in (tree-ssanames.h): Add to tree-ssanames.o and 
> > > GTFILES.
> > >
> > >See for example this build log:
> > >http://toolchain.lug-owl.de/buildbot/showlog.php?id=11663&mode=view
> > >
> > >I suggest this patch, which fixes an alpha-linux build for me:
> > I think you can remove the tree-flow.h include and you need to update the
> > dependencies in gcc/Makefile.in.
> of course... :-P
> 
> I see rs6000.c and i386.c  both use tree-flow.h as well.  I will
> have to see what they are actually pulling in from that file so I
> don't break those eventually too.

The build robot[1] found a similar problem:

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 -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -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/../libdecnumber -I../../../../gcc/gcc/../libdecnumber/dpd 
-I../libdecnumber -I../../../../gcc/gcc/../libbacktrace-o alpha.o -MT 
alpha.o -MMD -MP -MF ./.deps/alpha.TPo ../../../../gcc/gcc/config/alpha/alpha.c
In file included from ../../../../gcc/gcc/config/alpha/alpha.c:53:0:
../../../../gcc/gcc/config/alpha/alpha.c: In function ‘bool 
alpha_stdarg_optimize_hook(stdarg_info*, const_gimple)’:
../../../../gcc/gcc/tree-ssanames.h:62:56: error: invalid use of incomplete 
type ‘struct gimple_df’
 #define num_ssa_names (vec_safe_length (cfun->gimple_df->ssa_names))
^
../../../../gcc/gcc/config/alpha/alpha.c:5943:61: note: in expansion of macro 
‘num_ssa_names’
   || !bitmap_bit_p (si->va_list_vars, DECL_UID (base) + num_ssa_names))
 ^
In file included from ../../../../gcc/gcc/expr.h:24:0,
 from ../../../../gcc/gcc/config/alpha/alpha.c:36:
../../../../gcc/gcc/function.h:164:8: error: forward declaration of ‘struct 
gimple_df’
 struct gimple_df;
^
make[2]: *** [alpha.o] Error 1



r203314 is known-good 
(http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=16934),
r203320 is known-bad 
(http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=16956).

So this is probably uncovered by one of the three large patches in
betwee, which all fight heder file dependencies :)

MfG, JBG

[1] http://toolchain.lug-owl.de/buildbot/
http://toolchain.lug-owl.de/buildbot/timeline.php

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: Eine Freie Meinung in einem Freien Kopf
the second  :   für einen Freien Staat voll Freier Bürger.


signature.asc
Description: Digital signature


[buildrobot] Minor fallout of: Fix PR 57756

2013-10-16 Thread Jan-Benedict Glaw
On Wed, 2013-10-16 16:24:12 +1030, Alan Modra  wrote:
> On Tue, Oct 15, 2013 at 02:45:23PM -0700, Sriraman Tallam wrote:
> > I committed this patch after making the above change.
> 
> /src/gcc-virgin/gcc/config/rs6000/rs6000.c: At global scope:
> /src/gcc-virgin/gcc/config/rs6000/rs6000.c:31122:29: error: invalid 
> conversion from ‘void (*)(cl_target_option*)’ to ‘void (*)(cl_target_option*, 
> gcc_options*)’ [-fpermissive]
> /src/gcc-virgin/gcc/config/rs6000/rs6000.c:31122:29: error: invalid 
> conversion from ‘void (*)(cl_target_option*)’ to ‘void (*)(gcc_options*, 
> cl_target_option*)’ [-fpermissive]

Not quite...

Also causes another build failure seen only on some targets (m68k,
mips, ppc, s390 and sparc), but not all, which build robot[1] found:

m68k-linux  
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=19881
mips-linux  
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=19892
mips64-linux
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=19920
mips64el-linux  
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=19879
mipsel-linux
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=19924
powerpc-linux   
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=19903
powerpc64le-linux 
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=19917
powerpcle-linux 
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=19884
s390-linux  
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=19889
s390x-linux 
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=19913
sparc-linux 
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=19957
sparc64-linux   
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=19898

They're all similar, like this:

g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions 
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual 
-Wmissing-format-attribute -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 sparc.o -MT sparc.o -MMD -MP 
-MF ./.deps/sparc.TPo /home/jbglaw/repos/gcc/gcc/config/sparc/sparc.c
/home/jbglaw/repos/gcc/gcc/config/sparc/sparc.c: In function ‘void 
sparc_option_override()’:
/home/jbglaw/repos/gcc/gcc/config/sparc/sparc.c:1228: error: 
‘target_flags_explicit’ was not declared in this scope
/home/jbglaw/repos/gcc/gcc/config/sparc/sparc.c:1322: error: 
‘target_flags_explicit’ was not declared in this scope

It's always a missing declaration of `target_flags_explicit', so this
should be quite easy to fix.

MfG, JBG
[1] http://toolchain.lug-owl.de/buildbot/
http://toolchain.lug-owl.de/buildbot/timeline.php
-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:  Fortschritt bedeutet, einen Schritt so zu machen,
the second  :   daß man den nächsten auch noch machen kann.


signature.asc
Description: Digital signature


Re: [PATCH][i386]Fix PR 57756

2013-10-17 Thread Jan-Benedict Glaw
On Wed, 2013-10-16 19:40:21 -0700, Xinliang David Li  wrote:
> On Wed, Oct 16, 2013 at 6:06 PM, David Edelsohn  wrote:
> > On Wed, Oct 16, 2013 at 7:23 PM, Sriraman Tallam  
> > wrote:
> > > I was unable to build a native powerpc compiler. I checked for
> > > build_target_node and build_optimization_node throughout and
> > > changed rs6000 because it had references. I did not realize
> > > function_specific_save and function_specific_restore have to be
> > > changed. Sorry for breaking it.
> >
> > As Mike replied, gcc110 is available.  Richard Biener's approval
> > was dependent upon successful bootstrap and passing the regression
> > testsuite, which you did not even attempt, nor did you try to
> > build a cross-compiler.
> 
> This is an oversight. I agree that it is better to test on multiple
> platforms for large changes like this. In the past, Sri has been
> very attentive to any fallouts due to his changes, so is this time.

As of speaking about multiple platforms...  This patch didn't only
produce fallout on rs6k, but also for quite a number of other
architectures.

  I already send one message (it can be found in the archives at
http://gcc.gnu.org/ml/gcc-patches/2013-10/msg01156.html) listing quite
a number of targets that are broken right now. This situation didn't
change significantly since they started to fail. Please have a look at
my build robot[1]. All targets (except nds32, nios2 and arceb) used to
build.

  Don't get me wrong. I don't want to overly blame Sriraman for
breaking it in the first place. Shit happens. But please have an eye
on fixing the fallout, timely.

MfG, JBG
[1] http://toolchain.lug-owl.de/buildbot/?limit=2000

-- 
  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][i386]Fix PR 57756

2013-10-17 Thread Jan-Benedict Glaw
.c: In function ‘void 
alpha_option_override()’:
/home/jbglaw/repos/gcc/gcc/config/alpha/alpha.c:270: error: 
‘target_flags_explicit’ was not declared in this scope
/home/jbglaw/repos/gcc/gcc/config/alpha/alpha.c:403: error: 
‘target_flags_explicit’ was not declared in this scope
make[1]: *** [alpha.o] Error 1


m68k-linux 
(http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=20408)
~
g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions 
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual 
-Wmissing-format-attribute -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 m68k.o -MT m68k.o -MMD -MP 
-MF ./.deps/m68k.TPo /home/jbglaw/repos/gcc/gcc/config/m68k/m68k.c
/home/jbglaw/repos/gcc/gcc/config/m68k/m68k.c: In function ‘void 
m68k_option_override()’:
/home/jbglaw/repos/gcc/gcc/config/m68k/m68k.c:503: error: 
‘target_flags_explicit’ was not declared in this scope
/home/jbglaw/repos/gcc/gcc/config/m68k/m68k.c: In function ‘tree_node* 
m68k_handle_fndecl_attribute(tree_node**, tree_node*, tree_node*, int, bool*)’:
/home/jbglaw/repos/gcc/gcc/config/m68k/m68k.c:730: warning: unknown conversion 
type character ‘E’ in format
/home/jbglaw/repos/gcc/gcc/config/m68k/m68k.c:730: warning: too many arguments 
for format
make[1]: *** [m68k.o] Error 1


frv-linux (http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=20396)

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 -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. 
-I. -I/home/vaxbuild/repos/gcc/gcc -I/home/vaxbuild/repos/gcc/gcc/. 
-I/home/vaxbuild/repos/gcc/gcc/../include 
-I/home/vaxbuild/repos/gcc/gcc/../libcpp/include  
-I/home/vaxbuild/repos/gcc/gcc/../libdecnumber 
-I/home/vaxbuild/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I/home/vaxbuild/repos/gcc/gcc/../libbacktrace-o frv.o -MT frv.o -MMD -MP 
-MF ./.deps/frv.TPo /home/vaxbuild/repos/gcc/gcc/config/frv/frv.c
/home/vaxbuild/repos/gcc/gcc/config/frv/frv.c: In function ‘void 
frv_option_override()’:
/home/vaxbuild/repos/gcc/gcc/config/frv/frv.c:642:52: error: 
‘target_flags_explicit’ was not declared in this scope
   target_flags |= (frv_default_flags_for_cpu () & ~target_flags_explicit);
^
/home/vaxbuild/repos/gcc/gcc/config/frv/frv.c: In function ‘void 
frv_init_cumulative_args(int*, tree, rtx, tree, int)’:
/home/vaxbuild/repos/gcc/gcc/config/frv/frv.c:3097:51: error: invalid 
conversion from ‘int’ to ‘tree_code’ [-fpermissive]
  get_tree_code_name ((int)TREE_CODE (ret_type)));
   ^
make[1]: *** [frv.o] Error 1



The actual breakage is uncovered by this fragment:

--- a/gcc/opth-gen.awk
+++ b/gcc/opth-gen.awk
@@ -114,7 +114,6 @@ print "};"
 print "extern struct gcc_options global_options;"
 print "extern const struct gcc_options global_options_init;"
 print "extern struct gcc_options global_options_set;"
-print "#define target_flags_explicit global_options_set.x_target_flags"
 print "#endif"
 print "#endif"
 print ""


...which means that all code using target_flags_explicit needs to be
cared for.

> FWIW, I am testing this patch on i386 and powerpc right now.

Please also test it on at least the targets I reported breakages on.
Have a look here:

http://toolchain.lug-owl.de/buildbot/?limit=1500
http://toolchain.lug-owl.de/buildbot/timeline.php?limit=1500

Generally, if you're looking for targets that are at least somewhat
supported, you find a good list to start with at
contrib/config-list.mk .

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: [PATCH][i386]Fix PR 57756

2013-10-17 Thread Jan-Benedict Glaw
On Thu, 2013-10-17 11:06:44 -0700, Xinliang David Li  wrote:
> JBG, Steve, Can you help testing Sri's latest patch on your targets?
> This will help speed up the process.

The one-line revert will probably "fix" all of those.  Though it's
open to discussion if we want to do that, or forward-port all other
code. Probably a question the global reviewers should decide on.

Though if you want to, I'd easily configure another instance to
manually test some patches.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:   http://www.eyrie.org/~eagle/faqs/questions.html
the second  :


signature.asc
Description: Digital signature


[PATCH][buildrobot] frv: Fix get_tree_code_name() conversion fallout

2013-10-18 Thread Jan-Benedict Glaw
Hi!

When building for frv-linux, I see some fallout (cf.
http://toolchain.lug-owl.de/buildbot/deliver_artifact.php?mode=view&id=91345):

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 -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. 
-I. -I/home/vaxbuild/repos/gcc/gcc -I/home/vaxbuild/repos/gcc/gcc/. 
-I/home/vaxbuild/repos/gcc/gcc/../include 
-I/home/vaxbuild/repos/gcc/gcc/../libcpp/include  
-I/home/vaxbuild/repos/gcc/gcc/../libdecnumber 
-I/home/vaxbuild/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I/home/vaxbuild/repos/gcc/gcc/../libbacktrace-o frv.o -MT frv.o -MMD -MP 
-MF ./.deps/frv.TPo /home/vaxbuild/repos/gcc/gcc/config/frv/frv.c
/home/vaxbuild/repos/gcc/gcc/config/frv/frv.c: In function ‘void 
frv_init_cumulative_args(int*, tree, rtx, tree, int)’:
/home/vaxbuild/repos/gcc/gcc/config/frv/frv.c:3097:51: error: invalid 
conversion from ‘int’ to ‘tree_code’ [-fpermissive]
  get_tree_code_name ((int)TREE_CODE (ret_type)));
   ^
make[1]: *** [frv.o] Error 1

Fixed like this:

2013-10-18  Jan-Benedict Glaw  

gcc/
* config/frv/frv.c (frv_init_cumulative_args): Fix wrong cast.

diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 41ae2bb..bcd5511 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -3094,7 +3094,7 @@ frv_init_cumulative_args (CUMULATIVE_ARGS *cum,
{
  tree ret_type = TREE_TYPE (fntype);
  fprintf (stderr, " return=%s,",
-  get_tree_code_name ((int)TREE_CODE (ret_type)));
+  get_tree_code_name (TREE_CODE (ret_type)));
}
 
   if (libname && GET_CODE (libname) == SYMBOL_REF)


Ok?

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:   The real problem with C++ for kernel modules is:
the second  : the language just sucks.
   -- Linus Torvalds


signature.asc
Description: Digital signature


[PATCH][buildrobot] tilepro/tilegx: fallout after tree.h refactoring (was: Re-factor inclusion of tree.h)

2013-10-22 Thread Jan-Benedict Glaw
On Mon, 2013-10-21 15:36:49 -0400, Diego Novillo  wrote:
> Can anyone think of some way that we can use to automatically block
> inclusions of tree.h from header files? Code review is the only way
> that comes to mind.

Grep once, then install a commit hook.

> Committed both patches to trunk.

I get some fallout for tilepro-linux, see
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=21851 .

This fixes it:

2013-10-22  Jan-Benedict Glaw  

* config/tilepro/tilepro.c: Include "tree.h".

diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c
index 99ce5a0..12adda3 100644
--- a/gcc/config/tilepro/tilepro.c
+++ b/gcc/config/tilepro/tilepro.c
@@ -40,6 +40,7 @@
 #include "function.h"
 #include "dwarf2.h"
 #include "timevar.h"
+#include "tree.h"
 #include "gimple.h"
 #include "cfgloop.h"
 #include "tilepro-builtins.h"

Ok?

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


Re: [PATCH][buildrobot] tilepro/tilegx: fallout after tree.h refactoring (was: Re-factor inclusion of tree.h)

2013-10-23 Thread Jan-Benedict Glaw
On Tue, 2013-10-22 08:46:13 -0400, Diego Novillo  wrote:
> On Tue, Oct 22, 2013 at 4:22 AM, Jan-Benedict Glaw  wrote:
> > This fixes it:
> >
> > 2013-10-22  Jan-Benedict Glaw  
> >
> > * config/tilepro/tilepro.c: Include "tree.h".
> 
> Sure.  It qualifies as obvious.  Thanks.

Also committed this as obvious:

2013-10-23  Jan-Benedict Glaw  

* config/tilegx/tilegx.c: Include "tree.h".

Index: gcc/config/tilegx/tilegx.c
===
--- gcc/config/tilegx/tilegx.c  (revision 203950)
+++ gcc/config/tilegx/tilegx.c  (working copy)
@@ -39,6 +39,7 @@
 #include "function.h"
 #include "dwarf2.h"
 #include "timevar.h"
+#include "tree.h"
 #include "gimple.h"
 #include "cfgloop.h"
 #include "tilegx-builtins.h"

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


AIX: Dependency problem with xlC/g++ combination

2013-10-23 Thread Jan-Benedict Glaw
Hi!

When building on gcc111, I tried to use different compilers for my
build robot. This machine has IBM's XL C compiler installed, but not
the C++ compiler. So I used CC=xlC, g++ was auto-detected for CXX.
This led to depmode=aix, but g++ was actually used later on for
calculating dependencies, totally fucking up the build directory
(since it's output was wrongly parsed using aix-style.)

  Since some time, GCC's language is C++, so let's update dependency
generation to use the proper compiler, which in turn allows to build
the C parts (ie. binutils etc.) with a non-GNU C compiler.

  I'd like to get some comments on this patch, which works for me for
stage-1 builds with gcc/g++ (on a amd64-linux box) as well as with
xlC/g++ on gcc111 (the mentioned AIX machine):


2013-10-24  Jan-Benedict Glaw  

gcc/
* configure.ac (ZW_PROG_COMPILER_DEPENDENCIES): Use CXX instead of CC.
* Makefile.in (CXXDEPMODE): Assign and change users.
(CCDEPMODE): Delete.
* configure: Regenerate.

diff --git a/gcc/configure.ac b/gcc/configure.ac
index 509..5e686db 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -974,7 +974,7 @@ AC_CONFIG_COMMANDS([gccdepdir],[
   ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs $lang/$DEPDIR
   done], [subdirs="$subdirs" ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR])
 
-ZW_PROG_COMPILER_DEPENDENCIES([CC])
+ZW_PROG_COMPILER_DEPENDENCIES([CXX])
 AC_LANG_POP(C++)
 
 # 
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index f0b8c5a..f519455 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -311,7 +311,7 @@ write_entries_to_file = $(shell rm -f $(2) || :) $(shell 
touch $(2)) \
 # 
 
 # Dependency tracking stuff.
-CCDEPMODE = @CCDEPMODE@
+CXXDEPMODE = @CXXDEPMODE@
 DEPDIR = @DEPDIR@
 depcomp = $(SHELL) $(srcdir)/../depcomp
 
@@ -1040,7 +1040,7 @@ INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
   $(CLOOGINC) $(ISLINC)
 
 COMPILE.base = $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) -o $@
-ifeq ($(CCDEPMODE),depmode=gcc3)
+ifeq ($(CXXDEPMODE),depmode=gcc3)
 # Note a subtlety here: we use $(@D) for the directory part, to make
 # things like the go/%.o rule work properly; but we use $(*F) for the
 # file part, as we just want the file part of the stem, not the entire
@@ -1049,7 +1049,7 @@ COMPILE = $(COMPILE.base) -MT $@ -MMD -MP -MF 
$(@D)/$(DEPDIR)/$(*F).TPo
 POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(*F).TPo $(@D)/$(DEPDIR)/$(*F).Po
 else
 COMPILE = source='$<' object='$@' libtool=no \
-DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) $(COMPILE.base)
+DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) $(COMPILE.base)
 POSTCOMPILE =
 endif
 
diff --git a/gcc/configure b/gcc/configure
index bedf3b1..1e7bcb6 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -737,7 +737,7 @@ LDEXP_LIB
 EXTRA_GCC_LIBS
 GNAT_LIBEXC
 COLLECT2_LIBS
-CCDEPMODE
+CXXDEPMODE
 DEPDIR
 am__leading_dot
 CXXCPP
@@ -8766,12 +8766,12 @@ ac_config_commands="$ac_config_commands depdir"
 ac_config_commands="$ac_config_commands gccdepdir"
 
 
-depcc="$CC"   am_compiler_list=
+depcc="$CXX"  am_compiler_list=
 
 am_depcomp=$ac_aux_dir/depcomp
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" 
>&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   if test -f "$am_depcomp"; then
@@ -8793,7 +8793,7 @@ else
   # directory.
   mkdir sub
 
-  am_cv_CC_dependencies_compiler_type=none
+  am_cv_CXX_dependencies_compiler_type=none
   if test "$am_compiler_list" = ""; then
  am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
@@ -8838,7 +8838,7 @@ else
   #   icc: Command line remark: option '-MP' not supported
   if (grep 'ignoring option' conftest.err ||
   grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-am_cv_CC_dependencies_compiler_type=$depmode
+am_cv_CXX_dependencies_compiler_type=$depmode
$as_echo "$as_me:$LINENO: success" >&5
 break
   fi
@@ -8850,15 +8850,15 @@ else
   cd ..
   rm -rf conftest.dir
 else
-  am_cv_CC_dependencies_compiler_type=none
+  am_cv_CXX_dependencies_compiler_type=none
 fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >

Re: AIX: Dependency problem with xlC/g++ combination

2013-10-24 Thread Jan-Benedict Glaw
On Wed, 2013-10-23 20:21:50 -0400, David Edelsohn  wrote:
> On Wed, Oct 23, 2013 at 6:21 PM, Jan-Benedict Glaw  wrote:
> > When building on gcc111, I tried to use different compilers for my
> > build robot. This machine has IBM's XL C compiler installed, but not
> > the C++ compiler. So I used CC=xlC, g++ was auto-detected for CXX.
> > This led to depmode=aix, but g++ was actually used later on for
> > calculating dependencies, totally fucking up the build directory
> > (since it's output was wrongly parsed using aix-style.)
> 
> Why do you say that the C++ compiler is not installed on gcc111? That
> statement is incorrect.  The AIX XL C++ compiler is xlC, which you
> mention.
> 
> Updating the dependencies to C++ makes sense.

Ah! I thought this would be `xlc++', which is not in $PATH, unlike
`xlC', which is. Now I see that xlC is symlinked from
/usr/vacpp/bin/xlC, where the `xlc++' also exists (as a symlink to the
same file.)

  That's great, thanks for the notice! So I'll change one instance to
use xlC/xlc++ throughout the build.  However I still think that the
patch itself is correct and thus would like to discuss it to gain
final approval.

Thanks, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:   The real problem with C++ for kernel modules is:
the second  : the language just sucks.
   -- Linus Torvalds


signature.asc
Description: Digital signature


[PATCH][buildrobot] libcpp/lex.c: Use enum properly

2013-10-24 Thread Jan-Benedict Glaw
Hi!

While building with IBM's XL C/C++ compiler, I noticed (cf.
http://toolchain.lug-owl.de/buildbot/deliver_artifact.php?mode=view&id=128806):

source='/home/jbglaw/repos-IBM-XL/gcc/libcpp/lex.c' object='lex.o' libtool=no 
DEPDIR=.deps depmode=aix /bin/sh 
/home/jbglaw/repos-IBM-XL/gcc/libcpp/../depcomp /usr/vacpp/bin/xlc++  
-I/home/jbglaw/repos-IBM-XL/gcc/libcpp -I. 
-I/home/jbglaw/repos-IBM-XL/gcc/libcpp/../include 
-I/home/jbglaw/repos-IBM-XL/gcc/libcpp/include  -g -Wall -Wno-narrowing 
-Wwrite-strings -Wmissing-format-attribute   -fno-exceptions -fno-rtti 
-I/home/jbglaw/repos-IBM-XL/gcc/libcpp -I. 
-I/home/jbglaw/repos-IBM-XL/gcc/libcpp/../include 
-I/home/jbglaw/repos-IBM-XL/gcc/libcpp/include   -c 
/home/jbglaw/repos-IBM-XL/gcc/libcpp/lex.c
/usr/vacpp/bin/xlc++: 1501-289 (W) Option -Wall was incorrectly specified. The 
option will be ignored.
/usr/vacpp/bin/xlc++: 1501-289 (W) Option -Wno-narrowing was incorrectly 
specified. The option will be ignored.
/usr/vacpp/bin/xlc++: 1501-289 (W) Option -Wwrite-strings was incorrectly 
specified. The option will be ignored.
/usr/vacpp/bin/xlc++: 1501-289 (W) Option -Wmissing-format-attribute was 
incorrectly specified. The option will be ignored.
"/home/jbglaw/repos-IBM-XL/gcc/libcpp/lex.c", line 1381.17: 1506-277 (S) Syntax 
error: possible missing ';' or ','?
"/home/jbglaw/repos-IBM-XL/gcc/libcpp/lex.c", line 1381.3: 1506-045 (S) 
Undeclared identifier raw_str_phase.
"/home/jbglaw/repos-IBM-XL/gcc/libcpp/lex.c", line 1500.11: 1506-045 (S) 
Undeclared identifier phase.
make[1]: *** [lex.o] Error 1

Fixed like this:

2013-10-24  Jan-Benedict Glaw  

libcpp/
* lex.c (lex_raw_string): Use proper type.

diff --git a/libcpp/lex.c b/libcpp/lex.c
index ed794d5..4fa244d 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -1377,8 +1377,7 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token, 
const uchar *base,
   uchar temp_buffer[18];
   const uchar *orig_base;
   unsigned int raw_prefix_len = 0, raw_suffix_len = 0;
-  enum raw_str_phase { RAW_STR_PREFIX, RAW_STR, RAW_STR_SUFFIX };
-  raw_str_phase phase = RAW_STR_PREFIX;
+  enum raw_str_phase { RAW_STR_PREFIX, RAW_STR, RAW_STR_SUFFIX } phase = 
RAW_STR_PREFIX;
   enum cpp_ttype type;
   size_t total_len = 0;
   /* Index into temp_buffer during phases other than RAW_STR,


Ok?

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:   http://www.eyrie.org/~eagle/faqs/questions.html
the second  :


signature.asc
Description: Digital signature


Re: AIX: Dependency problem with xlC/g++ combination

2013-10-24 Thread Jan-Benedict Glaw
On Thu, 2013-10-24 10:16:25 +0100, Paolo Bonzini  wrote:
> Il 24/10/2013 03:17, Tom Tromey ha scritto:
> > Jan-Benedict>   I'd like to get some comments on this patch, which works
> > Jan-Benedict> for me for stage-1 builds with gcc/g++ (on a amd64-linux
> > Jan-Benedict> box) as well as with xlC/g++ on gcc111 (the mentioned AIX
> > Jan-Benedict> machine):
> > 
> > FWIW, I believe this patch is correct.
> > However, I cannot approve it.
> 
> The patch is okay indeed.

Thanks, committed as revision r204006.

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, rs6000] Fix PR63354

2016-01-23 Thread Jan-Benedict Glaw
On Thu, 2016-01-21 23:42:40 -0600, Bill Schmidt  
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


[ping] [patch] contrib/config-list.mk: Allow to build all targets individually

2013-11-26 Thread Jan-Benedict Glaw
On Sun, 2013-11-24 20:02:43 +0100, Jan-Benedict Glaw  wrote:
> 2013-11-24  Jan-Benedict Glaw  
> 
>   * config-list.mk (host_options): Allow to override it.
>   (LIST): Change "=" to "EQUAL".
>   (list): New target listing all configurations.
>   ($(LIST)): Substitute "EQUAL" back to "=".

Ping: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg03121.html

  Additional to that, I'd suggest to also add microblazeel-elf and
microblaze-rtems (cf. http://gcc.gnu.org/ml/gcc/2013-11/msg00547.html
and http://gcc.gnu.org/ml/gcc/2013-11/msg00545.html), though Joern
isn't fond of the idea (cf.
http://gcc.gnu.org/ml/gcc/2013-11/msg00528.html). So I'd quite like to
see a discussion about this.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: Eine Freie Meinung in einem Freien Kopf
the second  :   für einen Freien Staat voll Freier Bürger.


signature.asc
Description: Digital signature


Re: wide-int, vax

2013-11-28 Thread Jan-Benedict Glaw
On Sat, 2013-11-23 11:23:08 -0800, Mike Stump  wrote:
>   * config/vax/vax.c: Include wide-int.h.
>   (vax_float_literal): Use real_from_integer.

Looks good to me, but Matt must tell for sure.

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


[ping^2] [patch] contrib/config-list.mk: Allow to build all targets individually

2013-12-02 Thread Jan-Benedict Glaw
On Wed, 2013-11-27 02:43:08 +0100, Jan-Benedict Glaw  wrote:
> On Sun, 2013-11-24 20:02:43 +0100, Jan-Benedict Glaw  
> wrote:
> > 2013-11-24  Jan-Benedict Glaw  
> > 
> > * config-list.mk (host_options): Allow to override it.
> > (LIST): Change "=" to "EQUAL".
> > (list): New target listing all configurations.
> > ($(LIST)): Substitute "EQUAL" back to "=".
> 
Ping^2: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg03425.html

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


[buildrobot] Re: [PATCH] Split -fisolate-erroneous-paths into two options

2013-12-05 Thread Jan-Benedict Glaw
On Wed, 2013-12-04 20:19:29 -0700, Jeff Law  wrote:
> This patch splits up the erroneous path optimization into two
> pieces. One which detects NULL dereferences and isolates those paths
> and a second which detects passing/returning a NULL pointer in cases
> where an attribute says a non-NULL value is required.
[...]

This seems to break Go, see eg.
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=50428 :

g++ -c  -DDEFAULT_TARGET_VERSION=\"4.9.0\" 
-DDEFAULT_TARGET_MACHINE=\"i686-pc-linux-gnu\" -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 -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  
-DHAVE_CONFIG_H -I. -Igo -I../../../gcc/gcc -I../../../gcc/gcc/go 
-I../../../gcc/gcc/../include -I../../../gcc/gcc/../libcpp/include 
-I/opt/cfarm/mpc/include  -I../../../gcc/gcc/../libdecnumber 
-I../../../gcc/gcc/../libdecnumber/bid -I../libdecnumber 
-I../../../gcc/gcc/../libbacktrace-o go/go-lang.o -MT go/go-lang.o -MMD -MP 
-MF go/.deps/go-lang.TPo ../../../gcc/gcc/go/go-lang.c
../../../gcc/gcc/go/go-lang.c: In function ‘bool go_langhook_post_options(const 
char**)’:
../../../gcc/gcc/go/go-lang.c:276:27: error: ‘struct gcc_options’ has no member 
named ‘x_flag_isolate_erroneous_paths’
   if (!global_options_set.x_flag_isolate_erroneous_paths)
   ^
../../../gcc/gcc/go/go-lang.c:277:20: error: ‘struct gcc_options’ has no member 
named ‘x_flag_isolate_erroneous_paths’
 global_options.x_flag_isolate_erroneous_paths = 0;
^
make[2]: *** [go/go-lang.o] Error 1

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


[buildrobot] Re: Make C11 _Alignof return least not greatest alignment for a type (PR c/52023)

2013-12-05 Thread Jan-Benedict Glaw
On Thu, 2013-12-05 17:16:53 +0800, Bin.Cheng  wrote:
> On Thu, Dec 5, 2013 at 6:57 AM, Joseph S. Myers  
> wrote:
> > Index: c-family/c-common.c
> > ===
> > --- c-family/c-common.c (revision 205668)
> > +++ c-family/c-common.c (working copy)
> > @@ -4921,14 +4921,17 @@ c_common_get_alias_set (tree t)
> >  }
> >
> >  /* Compute the value of 'sizeof (TYPE)' or '__alignof__ (TYPE)', where
> > -   the second parameter indicates which OPERATOR is being applied.
> > +   the IS_SIZEOF parameter indicates which operator is being applied.
> > The COMPLAIN flag controls whether we should diagnose possibly
> > ill-formed constructs or not.  LOC is the location of the SIZEOF or
> > -   TYPEOF operator.  */
> > +   TYPEOF operator.  If MIN_ALIGNOF, the least alignment required for
> > +   a type in any context should be returned, rather than the normal
> > +   alignment for that type.  */
> >
> >  tree
> >  c_sizeof_or_alignof_type (location_t loc,
> > - tree type, bool is_sizeof, int complain)
> > + tree type, bool is_sizeof, bool min_alignof,
> > + int complain)
> >  {
> >const char *op_name;
> >tree value = NULL;
> > @@ -4994,6 +4997,22 @@ c_sizeof_or_alignof_type (location_t loc,
> > value = size_binop_loc (loc, CEIL_DIV_EXPR, TYPE_SIZE_UNIT (type),
> > size_int (TYPE_PRECISION (char_type_node)
> >   / BITS_PER_UNIT));
> > +  else if (min_alignof)
> > +   {
> > + unsigned int align = TYPE_ALIGN (type);
> > + align = MIN (align, BIGGEST_ALIGNMENT);
> > +#ifdef BIGGEST_FIELD_ALIGNMENT
> > + align = MIN (align, BIGGEST_FIELD_ALIGNMENT);
> > +#endif
> > + tree field = build_decl (UNKNOWN_LOCATION, FIELD_DECL, NULL_TREE,
> > +  type);
> > + unsigned int field_align = align;
> > +#ifdef ADJUST_FIELD_ALIGN
> > + field_align = ADJUST_FIELD_ALIGN (field, field_align);
> > +#endif
> 
> Won't *field* be unused if ADJUST_FIELD_ALIGN not defined?

You're right:

g++ -c  -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 -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/opt/cfarm/mpc/include  -I../../../gcc/gcc/../libdecnumber 
-I../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I../../../gcc/gcc/../libbacktrace-o c-family/c-common.o -MT 
c-family/c-common.o -MMD -MP -MF c-family/.deps/c-common.TPo 
../../../gcc/gcc/c-family/c-common.c
../../../gcc/gcc/c-family/c-common.c: In function ‘tree_node* 
c_sizeof_or_alignof_type(location_t, tree, bool, bool, int)’:
../../../gcc/gcc/c-family/c-common.c:5007:9: error: unused variable ‘field’ 
[-Werror=unused-variable]
tree field = build_decl (UNKNOWN_LOCATION, FIELD_DECL, NULL_TREE,
 ^
cc1plus: all warnings being treated as errors
make[2]: *** [c-family/c-common.o] Error 1

This is m68k-elf, see eg.
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=50551 ,
but other targets are also affected.

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] score: Silence warnings to fix config-list.mk build

2013-12-05 Thread Jan-Benedict Glaw
Hi!

This patch silences warnings (unused static functions, ambiguous
`else') for the score target.

2013-12-05  Jan-Benedict Glaw  

* config/score/score.c (score_force_temporary): Delete function.
(score_split_symbol): Ditto.
* config/score/score.h (ASM_OUTPUT_ADDR_DIFF_ELT): Add extra
parentheses to silence ambiguity warning.

 
diff --git a/gcc/config/score/score.c b/gcc/config/score/score.c
index 3fdf2ea..30b49ed 100644
--- a/gcc/config/score/score.c
+++ b/gcc/config/score/score.c
@@ -516,30 +516,6 @@ score_output_mi_thunk (FILE *file, tree thunk_fndecl 
ATTRIBUTE_UNUSED,
   reload_completed = 0;
 }
 
-/* Copy VALUE to a register and return that register.  If new psuedos
-   are allowed, copy it into a new register, otherwise use DEST.  */
-static rtx
-score_force_temporary (rtx dest, rtx value)
-{
-  if (can_create_pseudo_p ())
-return force_reg (Pmode, value);
-  else
-{
-  emit_move_insn (copy_rtx (dest), value);
-  return dest;
-}
-}
-
-/* Return a LO_SUM expression for ADDR.  TEMP is as for score_force_temporary
-   and is used to load the high part into a register.  */
-static rtx
-score_split_symbol (rtx temp, rtx addr)
-{
-  rtx high = score_force_temporary (temp,
- gen_rtx_HIGH (Pmode, copy_rtx (addr)));
-  return gen_rtx_LO_SUM (Pmode, high, addr);
-}
-
 /* Fill INFO with information about a single argument.  CUM is the
cumulative state for earlier arguments.  MODE is the mode of this
argument and TYPE is its type (if known).  NAMED is true if this
diff --git a/gcc/config/score/score.h b/gcc/config/score/score.h
index 5ab7875..e3bb7f0 100644
--- a/gcc/config/score/score.h
+++ b/gcc/config/score/score.h
@@ -757,11 +757,12 @@ typedef struct score_args
entries PC-relative in GP-relative when .gp(d)word is supported.  */
 #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL)\
   do {\
-if (TARGET_SCORE7)\
+if (TARGET_SCORE7) {  \
   if (flag_pic)   \
 fprintf (STREAM, "\t.gpword %sL%d\n", LOCAL_LABEL_PREFIX, VALUE); \
   else\
 fprintf (STREAM, "\t.word %sL%d\n", LOCAL_LABEL_PREFIX, VALUE);   \
+} \
   } while (0)
 
 /* Jump table alignment is explicit in ASM_OUTPUT_CASE_LABEL.  */





Ok?

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
 Signature of:Arroganz verkürzt fruchtlose Gespräche.
 the second  :       -- Jan-Benedict Glaw


signature.asc
Description: Digital signature


Re: [buildrobot] score: Silence warnings to fix config-list.mk build

2013-12-05 Thread Jan-Benedict Glaw
On Thu, 2013-12-05 14:22:46 -0700, Jeff Law  wrote:
> On 12/05/13 14:17, Jan-Benedict Glaw wrote:
> >diff --git a/gcc/config/score/score.h b/gcc/config/score/score.h
> >index 5ab7875..e3bb7f0 100644
> >--- a/gcc/config/score/score.h
> >+++ b/gcc/config/score/score.h
> >@@ -757,11 +757,12 @@ typedef struct score_args
> > entries PC-relative in GP-relative when .gp(d)word is supported.  */
> >  #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL)\
> >do {\
> >-if (TARGET_SCORE7)\
> >+if (TARGET_SCORE7) {  \
> >if (flag_pic)   \
> >  fprintf (STREAM, "\t.gpword %sL%d\n", LOCAL_LABEL_PREFIX, VALUE); \
> >else\
> >  fprintf (STREAM, "\t.word %sL%d\n", LOCAL_LABEL_PREFIX, VALUE);   \
> >+} \
> >} while (0)
> >
> >  /* Jump table alignment is explicit in ASM_OUTPUT_CASE_LABEL.  */
> Formatting nit.  The open curley should be on its own line, indented
> 2 spaces relative to its conditional.  Its close paren should also
> be on its own line at the same indention level as the open curley.
> 
> Note this will cause all the code inside the new curleys to need to
> be reindented as well.

I know! But look at the code around the macro I touched: It's all
formatted that way, so I decided to stay with that style. (As well as
the trailing '\' are indented all the way with spaces.)

  So... Rework it all to use common indention? Or change it only right
here? Or propose another patch changing it to the usual indention style?

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: [buildrobot] score: Silence warnings to fix config-list.mk build

2013-12-05 Thread Jan-Benedict Glaw
On Thu, 2013-12-05 20:49:06 -0700, Jeff Law  wrote:
> On 12/05/13 14:33, Jan-Benedict Glaw wrote:
> > On Thu, 2013-12-05 14:22:46 -0700, Jeff Law  wrote:
> > > On 12/05/13 14:17, Jan-Benedict Glaw wrote:
[...]

> I'd just change this one to be correct for the GNU style.  If you
> wanted to follow-up with another patch to fix these throughout the
> port, that'd be appreciated.


2013-12-06  Jan-Benedict Glaw  

* config/score/score.c (score_force_temporary): Delete function.
(score_split_symbol): Ditto.
* config/score/score.h (ASM_OUTPUT_ADDR_DIFF_ELT): Add extra
parentheses to silence ambiguity warning and reindent.

diff --git a/gcc/config/score/score.c b/gcc/config/score/score.c
index 3fdf2ea..30b49ed 100644
--- a/gcc/config/score/score.c
+++ b/gcc/config/score/score.c
@@ -516,30 +516,6 @@ score_output_mi_thunk (FILE *file, tree thunk_fndecl 
ATTRIBUTE_UNUSED,
   reload_completed = 0;
 }
 
-/* Copy VALUE to a register and return that register.  If new psuedos
-   are allowed, copy it into a new register, otherwise use DEST.  */
-static rtx
-score_force_temporary (rtx dest, rtx value)
-{
-  if (can_create_pseudo_p ())
-return force_reg (Pmode, value);
-  else
-{
-  emit_move_insn (copy_rtx (dest), value);
-  return dest;
-}
-}
-
-/* Return a LO_SUM expression for ADDR.  TEMP is as for score_force_temporary
-   and is used to load the high part into a register.  */
-static rtx
-score_split_symbol (rtx temp, rtx addr)
-{
-  rtx high = score_force_temporary (temp,
- gen_rtx_HIGH (Pmode, copy_rtx (addr)));
-  return gen_rtx_LO_SUM (Pmode, high, addr);
-}
-
 /* Fill INFO with information about a single argument.  CUM is the
cumulative state for earlier arguments.  MODE is the mode of this
argument and TYPE is its type (if known).  NAMED is true if this
diff --git a/gcc/config/score/score.h b/gcc/config/score/score.h
index 5ab7875..c6a2f34 100644
--- a/gcc/config/score/score.h
+++ b/gcc/config/score/score.h
@@ -755,13 +755,15 @@ typedef struct score_args
 /* Output of Dispatch Tables.  */
 /* This is how to output an element of a case-vector.  We can make the
entries PC-relative in GP-relative when .gp(d)word is supported.  */
-#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL)\
-  do {\
-if (TARGET_SCORE7)\
-  if (flag_pic)   \
-fprintf (STREAM, "\t.gpword %sL%d\n", LOCAL_LABEL_PREFIX, VALUE); \
-  else\
-fprintf (STREAM, "\t.word %sL%d\n", LOCAL_LABEL_PREFIX, VALUE);   \
+#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) 
\
+  do { 
\
+if (TARGET_SCORE7) 
\
+  {
\
+   if (flag_pic)   
\
+ fprintf (STREAM, "\t.gpword %sL%d\n", LOCAL_LABEL_PREFIX, VALUE); 
\
+   else
\
+ fprintf (STREAM, "\t.word %sL%d\n", LOCAL_LABEL_PREFIX, VALUE);   
\
+  }
\
   } while (0)
 
 /* Jump table alignment is explicit in ASM_OUTPUT_CASE_LABEL.  */


I'll probably prepare another patch to fix indention for what's left.

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


  1   2   3   >