[Bug target/108505] [13 Regression] Arm: arm-none-eabi toolchain build failing with compiler error.

2023-01-24 Thread srinath.parvathaneni at arm dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108505

Srinath Parvathaneni  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Srinath Parvathaneni  
---
Fixed in gcc-trunk.

[Bug target/108505] [13 Regression] Arm: arm-none-eabi toolchain build failing with compiler error.

2023-01-23 Thread srinath.parvathaneni at arm dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108505

--- Comment #3 from Srinath Parvathaneni  
---
I introduced the bug, working on the fix.

[Bug target/108505] [13 Regression] Arm: arm-none-eabi toolchain build failing with compiler error.

2023-01-23 Thread srinath.parvathaneni at arm dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108505

--- Comment #2 from Srinath Parvathaneni  
---
/media/sripar01/2tb_work/trunk_gcc_13/src/gcc/configure'  
'--target=arm-none-eabi'
'--prefix=/media/sripar01/2tb_work/trunk_gcc_13/build-arm-none-eabi/install'
'--with-gmp=/media/sripar01/2tb_work/trunk_gcc_13/build-arm-none-eabi/host-tools'
'--with-mpfr=/media/sripar01/2tb_work/trunk_gcc_13/build-arm-none-eabi/host-tools'
'--with-mpc=/media/sripar01/2tb_work/trunk_gcc_13/build-arm-none-eabi/host-tools'
'--with-isl=/media/sripar01/2tb_work/trunk_gcc_13/build-arm-none-eabi/host-tools'
'--disable-shared' '--disable-nls' '--disable-threads' '--disable-tls'
'--enable-checking=yes' '--without-cloog' '--without-isl' '--with-newlib'
'--without-headers' '--with-gnu-as' '--with-gnu-ld'
'--with-sysroot=/media/sripar01/2tb_work/trunk_gcc_13/build-arm-none-eabi/install/arm-none-eabi'
'--with-multilib-list=aprofile,rmprofile' '--with-pkgversion=unknown'
'target_alias=arm-none-eabi' 'CFLAGS=-O0 -g3' 'CXXFLAGS=-O0 -g3'
'--enable-languages=c,lto' $ac_configure_extra_args --no-create --no-recursion

[Bug c/108505] New: Arm: arm-none-eabi toolchain build failing with compiler error.

2023-01-23 Thread srinath.parvathaneni at arm dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108505

Bug ID: 108505
   Summary: Arm: arm-none-eabi toolchain build failing with
compiler error.
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: srinath.parvathaneni at arm dot com
  Target Milestone: ---

The latest arm-none-eabi build for gcc-trunk failing with following error:

/bin/bash /media/sripar01/2tb_work/trunk_gcc_13/src/gcc/gcc/../move-if-change
tmp-constants.h insn-constants.h
/bin/bash /media/sripar01/2tb_work/trunk_gcc_13/src/gcc/gcc/../move-if-change
tmp-enums.cc insn-enums.cc
echo timestamp > s-constants
echo timestamp > s-enums
/bin/bash /media/sripar01/2tb_work/trunk_gcc_13/src/gcc/gcc/../move-if-change
tmp-options.h options.h
echo timestamp > s-options-h
build/gengtype  \
-S /media/sripar01/2tb_work/trunk_gcc_13/src/gcc/gcc -I
gtyp-input.list -w tmp-gtype.state
g++ -c   -O0 -g3   -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/media/sripar01/2tb_work/trunk_gcc_13/src/gcc/gcc
-I/media/sripar01/2tb_work/trunk_gcc_13/src/gcc/gcc/build
-I/media/sripar01/2tb_work/trunk_gcc_13/src/gcc/gcc/../include 
-I/media/sripar01/2tb_work/trunk_gcc_13/src/gcc/gcc/../libcpp/include  \
-o build/gencheck.o
/media/sripar01/2tb_work/trunk_gcc_13/src/gcc/gcc/gencheck.cc
gtyp-input.list:19: file
/media/sripar01/2tb_work/trunk_gcc_13/src/gcc/gcc/config/arm/arm-mlib.h
specified more than once for language (all)
g++   -O0 -g3   -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/gencheck \
build/gencheck.o ../build-x86_64-pc-linux-gnu/libiberty/libiberty.a
build/gencheck > tmp-check.h
/bin/bash /media/sripar01/2tb_work/trunk_gcc_13/src/gcc/gcc/../move-if-change
tmp-check.h tree-check.h
echo timestamp > s-check
make[1]: *** [Makefile:2823: s-gtype] Error 1
make[1]: *** Waiting for unfinished jobs
/bin/bash /media/sripar01/2tb_work/trunk_gcc_13/src/gcc/gcc/../move-if-change
tmp-mlib.h multilib.h
echo timestamp > s-mlib
rm gcov.pod gcov-dump.pod gpl.pod cpp.pod gfdl.pod fsf-funding.pod gcc.pod
gcov-tool.pod lto-dump.pod
make[1]: Leaving directory
'/media/sripar01/2tb_work/trunk_gcc_13/build-arm-none-eabi/obj/gcc1/gcc'
make: *** [Makefile:4600: all-gcc] Error 2
make: Leaving directory
'/media/sripar01/2tb_work/trunk_gcc_13/build-arm-none-eabi/obj/gcc1'

And this build failure is due to following patch:

commit 3a0dd2cc28ee2833dc5bf1d4fb6d746a8c55ca4d
Author: Srinath Parvathaneni 
Date:   Mon Jan 23 11:04:19 2023 +

arm: Add pacbti related multilib support for armv8.1-m.main.

[Bug target/94317] gcc/config/arm/arm_mve.h:13907: strange assignment ?

2020-03-25 Thread srinath.parvathaneni at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94317

--- Comment #3 from Srinath Parvathaneni  
---
Thanks David for reporting this issue, I'm working on it.

Could someone assign this to me, I could not do it myself.

Regards,
SRI.

[Bug c/91937] _Generic Feature Expansion

2019-09-30 Thread srinath.parvathaneni at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91937

--- Comment #2 from Srinath Parvathaneni  
---
I'm using _Generic to create polymorphic implementations of MVE intrinsics.
MVE have more than 50 data types (combinations) and intrinsics with more upto 5
arguments. So on nesting a call to just two intrinsics is expanding to more
than 4000 lines. The nesting of calls increases pre-processor output
exponentially and slowing down the compiler.

I'm expecting "_Generic" could expand only to exactly matching combination
which would optimize the pre-processor output file size.

[Bug c/91937] New: _Generic Feature Expansion

2019-09-30 Thread srinath.parvathaneni at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91937

Bug ID: 91937
   Summary: _Generic Feature Expansion
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: srinath.parvathaneni at arm dot com
  Target Milestone: ---

Created attachment 46983
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46983=edit
Preprocessor output

On compiling the following test.c with gcc and checking the preprocessor file.

In C, for a macro using "_Generic" feature, "_Generic" expands completely but
not just for the matching case. This expansion is increasing the pre-processor
file size enormously in case of nested macros and slowing down the compiler.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
5.4.0-6ubuntu1~16.04.11' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-5 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 

$ cat test.c
enum {
  type_int_t = 1,
  type_char_t,
  type_float_t,
  type_int_p_t,
  type_float_p_t,
  type_char_p_t,
  type_int_16,
  type_int_32
};

float bb;
char cc;

#define _TYPE(x) _Generic(x, \
int *: type_int_p_t, \
float *: type_float_p_t, \
char *:  type_char_p_t, \
default: _Generic(x, \
short: type_int_16, \
long: type_int_32,\
int: type_int_t, \
char: type_char_t, \
float: type_float_t))

extern void *__undef;
#define cast(param, type) \
_Generic(param, type: param, default: *(type *)__undef)

#define reg(p0) _Generic( \
   (int (*)[_TYPE(p0)])0, \
  int (*)[type_int_t]: reg_s8(cast(p0, int)), \
  int (*)[type_char_t]: reg_f8(cast(p0, char)), \
  int (*)[type_float_t]: reg_c8(cast(p0, float)), \
  int (*)[type_int_p_t]: reg_sp(cast(p0, int *)), \
  int (*)[type_float_p_t]: reg_fp(cast(p0, float *)), \
  int (*)[type_char_p_t]: reg_cp(cast(p0, char *)))


float
reg_s8(int a)
{
  return bb;
}

void reg_f8(float a){}
void reg_c8(char a){}
void reg_sp(int *a){}
void reg_fp(float *a){}
void reg_cp(char *a){}

int main()
{
  int a;
  float b;
  char c;
  reg(a);
  reg(reg(a)); // more levels of nesting, more complex preprocessor output.
  return 0;
}

$ gcc test.c --save-temps

[Bug fortran/89987] ICE on GCC trunk and GCC 8 on arm-none-linux-gnueabihf target with “-O1” option

2019-04-08 Thread srinath.parvathaneni at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89987

--- Comment #4 from Srinath Parvathaneni  
---
(In reply to Thomas Koenig from comment #3)
> Can you update to a revision after r270150 and try again?

On gcc trunk this got fixed as follows.
$ ./arm-none-linux-gnueabihf-gfortran test.f90 -O1
test.f90:2:26:

2 |   k = transfer (transfer (e, e), 1)
  |  1
Error: 'SOURCE' argument of 'TRANSFER' intrinsic at (1) must not be a PROCEDURE

[Bug fortran/89987] ICE on GCC trunk and GCC 8 on arm-none-linux-gnueabihf target with “-O1” option

2019-04-08 Thread srinath.parvathaneni at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89987

--- Comment #2 from Srinath Parvathaneni  
---
$ ./arm-none-linux-gnueabihf-gfortran test.f90 -S -O1 -v
Using built-in specs.
COLLECT_GCC=./arm-none-linux-gnueabihf-gfortran
Target: arm-none-linux-gnueabihf
Configured with:
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/configure
--with-arch=armv7-a --with-fpu=neon --with-float=hard --with-mode=thumb
--with-isl=/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/build-native-arm-none-linux-gnueabihf/host-tools
--without-cloog --build=arm-none-linux-gnueabihf
--host=arm-none-linux-gnueabihf --target=arm-none-linux-gnueabihf --prefix=/usr
--enable-languages=c,c++,fortran --enable-plugin --enable-gnu-indirect-function
--with-gmp=/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/build-native-arm-none-linux-gnueabihf/host-tools
--with-mpfr=/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/build-native-arm-none-linux-gnueabihf/host-tools
--with-mpc=/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/build-native-arm-none-linux-gnueabihf/host-tools
--with-gnu-ld --with-plugin-ld=ld --with-pkgversion=fsf-trunk.1858
--disable-libsanitizer
Thread model: posix
gcc version 9.0.1 20190404 (experimental) (fsf-trunk.1858) 
COLLECT_GCC_OPTIONS='-S' '-O1' '-v'  '-mfloat-abi=hard' '-mfpu=neon' '-mthumb'
'-mtls-dialect=gnu' '-march=armv7-a+simd'

/home/sripar01/STP/fsf-8/usr/bin/../libexec/gcc/arm-none-linux-gnueabihf/9.0.1/f951
test.f90 -quiet -dumpbase test.f90 -mfloat-abi=hard -mfpu=neon -mthumb
-mtls-dialect=gnu -march=armv7-a+simd -auxbase test -O1 -version -o test.s
-fintrinsic-modules-path
/home/sripar01/STP/fsf-8/usr/bin/../lib/gcc/arm-none-linux-gnueabihf/9.0.1/finclude
GNU Fortran (fsf-trunk.1858) version 9.0.1 20190404 (experimental)
(arm-none-linux-gnueabihf)
compiled by GNU C version 9.0.1 20190404 (experimental), GMP version
4.3.2, MPFR version 3.1.6, MPC version 1.0.3, isl version
isl-0.18-e8d574175192-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Fortran2008 (fsf-trunk.1858) version 9.0.1 20190404 (experimental)
(arm-none-linux-gnueabihf)
compiled by GNU C version 9.0.1 20190404 (experimental), GMP version
4.3.2, MPFR version 3.1.6, MPC version 1.0.3, isl version
isl-0.18-e8d574175192-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
during GIMPLE pass: ccp
test.f90:3:0:

3 | end
  | 
internal compiler error: in fold_convert_loc, at fold-const.c:2552
0x438231 fold_convert_loc(unsigned int, tree_node*, tree_node*)
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/fold-const.c:2552
0x78dfb5 evaluate_stmt
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-ccp.c:1997
0x78eea1 visit_assignment
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-ccp.c:2352
0x7f905b ssa_propagation_engine::simulate_stmt(gimple*)
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-propagate.c:230
0x7f927d ssa_propagation_engine::simulate_block(basic_block_def*)
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-propagate.c:337
0x7fa33b ssa_propagation_engine::ssa_propagate()
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-propagate.c:802
0x787197 do_ssa_ccp
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-ccp.c:2471
0x787197 execute
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-ccp.c:2515

[Bug middle-end/89987] New: ICE on GCC trunk and GCC 8 on arm-none-linux-gnueabihf target with “-O1” option

2019-04-05 Thread srinath.parvathaneni at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89987

Bug ID: 89987
   Summary: ICE on GCC trunk and GCC 8 on arm-none-linux-gnueabihf
target with “-O1” option
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: srinath.parvathaneni at arm dot com
  Target Milestone: ---

ICE on GCC trunk and latest GCC 8 on arm-none-linux-gnueabihf with “-O1”
option.

$cat test.f90
recursive subroutine e
  k = transfer (transfer (e, e), 1)
end

$arm-none-linux-gnueabihf-gfortran test.f90 -O1 -S
during GIMPLE pass: ccp
../../test.f90:3:0:

3 | end
  | 
internal compiler error: in fold_convert_loc, at fold-const.c:2552
0x438231 fold_convert_loc(unsigned int, tree_node*, tree_node*)
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/fold-const.c:2552
0x78dfb5 evaluate_stmt
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-ccp.c:1997
0x78eea1 visit_assignment
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-ccp.c:2352
0x7f905b ssa_propagation_engine::simulate_stmt(gimple*)
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-propagate.c:230
0x7f927d ssa_propagation_engine::simulate_block(basic_block_def*)
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-propagate.c:337
0x7fa33b ssa_propagation_engine::ssa_propagate()
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-propagate.c:802
0x787197 do_ssa_ccp
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-ccp.c:2471
0x787197 execute
   
/tmp/dgboter/bbs/moonshot-dsg-20-armhf--armhf/buildbot/native-glibc-arm-none-linux-gnueabihf/build/src/gcc/gcc/tree-ssa-ccp.c:2515