[Bug c/57329] New: ICE with -O2 and -mthumb

2013-05-19 Thread Martin.Jansa at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57329

Bug ID: 57329
   Summary: ICE with -O2 and -mthumb
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: Martin.Jansa at gmail dot com

Created attachment 30146
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30146&action=edit
pixman-ice.c

Hi, when compiling pixman for armv4t or armv5te with thumb enabled I've noticed
ICE, disabling thumb or O2 is enough to build it without ICE.

$ arm-oe-linux-gnueabi-gcc -march=armv5te -mthumb -O2 -c pixman-ice.c -o
pixman-ice.o
pixman-ice.c: In function 'prng_srand_r':
pixman-ice.c:113:1: internal compiler error: Segmentation fault
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

pixman-ice.c and preprocessed pixman-ice.E attached.


[Bug c/57329] ICE with -O2 and -mthumb

2013-05-19 Thread Martin.Jansa at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57329

--- Comment #1 from Martin Jansa  ---
Created attachment 30147
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30147&action=edit
pixman-ice.E


[Bug target/57329] ICE with -O2 and -mthumb

2013-06-12 Thread Martin.Jansa at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57329

--- Comment #3 from Martin Jansa  ---
Hi Terry,

> With Bin's patch at http://gcc.gnu.org/ml/gcc-cvs/2013-03/msg00784.html, we 
> will get correct rtx cost.

I can confirm that with 4.8.1 + this patch I don't see ICE anymore.

> I believe this is the cause of the issue and am doing back port to 4.8 branch.

Please do, thanks.

I'll start one more build with 4.8.1 but without this patch to check that it
wasn't fixed by some other change between 4.8.0 and 4.8.1 - but if I don't
reply today, then it's really fixed by Bin's patch.


[Bug c++/57735] New: ICE with -mtune=xscale (error: could not split insn) when building webkit

2013-06-27 Thread Martin.Jansa at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57735

Bug ID: 57735
   Summary: ICE with -mtune=xscale (error: could not split insn)
when building webkit
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: Martin.Jansa at gmail dot com

Created attachment 30391
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30391&action=edit
JSGlobalObjectFunctions.cpp.tar.bz2

I'll try to attach smaller test-case later, but real-world reproducer follows:

/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/xscalete-oe-linux-gnueabi/arm-oe-linux-gnueabi-g++
-v
Using built-in specs.
COLLECT_GCC=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/xscalete-oe-linux-gnueabi/arm-oe-linux-gnueabi-g++
COLLECT_LTO_WRAPPER=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/xscalete-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.1/lto-wrapper
Target: arm-oe-linux-gnueabi
Configured with:
/OE/shr-core/tmp-eglibc/work-shared/gcc-4.8.1-r0/gcc-4.8.1/configure
--build=x86_64-linux --host=x86_64-linux --target=arm-oe-linux-gnueabi
--prefix=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr
--exec_prefix=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr
--bindir=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/xscalete-oe-linux-gnueabi
--sbindir=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/xscalete-oe-linux-gnueabi
--libexecdir=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/xscalete-oe-linux-gnueabi
--datadir=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/share
--sysconfdir=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/etc
--sharedstatedir=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/com
--localstatedir=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/var
--libdir=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/xscalete-oe-linux-gnueabi
--includedir=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include
--oldincludedir=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include
--infodir=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/share/info
--mandir=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/share/man
--disable-silent-rules --disable-dependency-tracking
--with-libtool-sysroot=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux
--with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix
--disable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu
--enable-libstdcxx-pch --program-prefix=arm-oe-linux-gnueabi-
--without-local-prefix --enable-target-optspace --enable-lto --enable-libssp
--disable-bootstrap --disable-libmudflap --with-system-zlib
--with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no
--with-cloog=no --enable-checking=release --enable-cheaders=c_global
--with-float=soft
--with-gxx-include-dir=/OE/shr-core/tmp-eglibc/sysroots/spitz/usr/include/c++
--with-sysroot=/OE/shr-core/tmp-eglibc/sysroots/spitz
--with-build-sysroot=/OE/shr-core/tmp-eglibc/sysroots/spitz
--enable-poison-system-directories --disable-libunwind-exceptions
--with-mpfr=/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr
--with-system-zlib --disable-nls
Thread model: posix
gcc version 4.8.1 (GCC) 


/OE/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/webkit-efl/1.9.3+svnr120144-r3/src/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:150:1:
error: could not split insn
 }
 ^
(insn 505 8094 507 (set (reg:SI 1 r1 [orig:494 D.142559 ] [494])
(plus:SI (reg/v:SI 5 r5 [orig:157 character ] [157])
(const_int -17179934720 [0xfffb])))
/OE/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/webkit-efl/1.9.3+svnr120144-r3/src/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:108
5 {*arm_addsi3}
 (nil))
/OE/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/webkit-efl/1.9.3+svnr120144-r3/src/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:150:1:
internal compiler error: in final_scan_insn, at final.c:2897
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
{standard input}: Assembler messages:
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc
directive

Removing -mtune=xscale is enough to pass that (the same source builds fine for
other devices I'm using), using -mtune=arm926ej-s also works.

Attached archive contains 3 files:
-rw-r--r-- 1 bitbake bitbake 1932165 Jun 27 17:37
CMakeFiles/javascriptcore_efl.dir/runtime/JSGlobalObjectFunctions.cpp.E#
preprocessed source
-rw-r--r-- 1 bitbake bitbake3809 Jun 27 17:45
CMakeFiles/javascriptcore_efl.dir/runtime/JSGlobalObjectFunctions.cpp.cmd  #
command line used
-rw-r--r-- 1 bitbake bitbake   28308 Jun 27 17:46
CMakeFiles/javascriptcore_efl.dir/runtime/JSGlobalObjectFunctions.cpp.log  #
output with couple of warnings before that ICE

Sorry f

[Bug rtl-optimization/108681] [13 Regression] gcc hangs compiling opencv/channels_combine.cpp for aarch64

2023-02-14 Thread Martin.Jansa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108681

--- Comment #10 from Martin Jansa  ---
(In reply to rsand...@gcc.gnu.org from comment #9)
> Fixed.

Thanks, I can confirm that it fixes the hang in the original case (building
carotene in opencv).

[Bug c++/96204] gcc complains about private member access in SFINAE context

2022-05-25 Thread Martin.Jansa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96204

Martin Jansa  changed:

   What|Removed |Added

 CC||Martin.Jansa at gmail dot com

--- Comment #8 from Martin Jansa  ---
Can this be please backported to 11 release as well?

[Bug target/111418] ICE with the CVE-2023-4039 patches applied

2023-09-14 Thread Martin.Jansa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111418

--- Comment #1 from Martin Jansa  ---
https://github.com/csmith-project/creduce

reduced my test case to:

typedef a;
typedef struct {
  short b __attribute__((aligned(8)))
} c;
typedef struct {
  short d __attribute__((aligned(8)))
} e;
typedef struct {
  int f;
  a g
} h;
typedef struct {
  int i;
  int j;
  a k;
  h l;
  e m;
  a n;
  a o;
  a p;
  a a;
  a q
} r;
typedef struct {
  r s;
  r t;
  r u;
  r b;
  a : 2, : 22, : 10;
  a : 4, : 4, : 16;
  struct {
char c;
c d;
c e
  }
} v;
w;
x() {
  v a;
  w = __builtin_alloca(sizeof(e));
  a.s.l.f = a.s.l.g = x;
  ai(a);
}

$ aarch64-oe-linux-gcc --version
aarch64-oe-linux-gcc (GCC) 13.2.0

And to reproduce need to use -fstack-protector-strong as well as -O2:

$ aarch64-oe-linux-gcc -fstack-protector-strong -O2 -c test.c
... bunch of warnings ...
test.c:43:1: error: unrecognizable insn:
   43 | }
  | ^
(insn 87 27 29 2 (parallel [
(set (mem/c:SI (plus:DI (reg/f:DI 29 x29)
(const_int -260 [0xfefc])) [1 a.s.l.f+0 S4
A32])
(reg:SI 4 x4 [107]))
(set (mem/c:SI (plus:DI (reg/f:DI 29 x29)
(const_int -256 [0xff00])) [1 a.s.l.g+0 S4
A128])
(reg:SI 4 x4 [107]))
]) "test.c":42:3 -1
 (expr_list:REG_DEAD (reg:SI 4 x4 [107])
(nil)))
during RTL pass: cprop_hardreg
test.c:43:1: internal compiler error: in extract_insn, at recog.cc:2791  
0x18d8d3b internal_error(char const*, ...)
???:0
0x6b3c5a fancy_abort(char const*, int, char const*)
???:0
0x692708 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
???:0
0x69272a _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
???:0
0xbe23ef extract_constrain_insn(rtx_insn*)
???:0

Will check with gcc trunk if it's still reproducible there. gcc-12.3.0 shows
the same ICE while gcc-11.4.0 built the same code OK.

[Bug target/111418] ICE with the CVE-2023-4039 patches applied

2023-09-14 Thread Martin.Jansa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111418

--- Comment #3 from Martin Jansa  ---
Reproduced with:
13.2.1 20230914 (revision 9cddebd822aeff9b7c0e9951909d5ec96c959e4f)
and
14.0.0 20230914 (experimental) (revision
8517317ce8e9fbea0b4c7a8f87a86d07d95dc8c7)
as well.

[Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong

2023-09-15 Thread Martin.Jansa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111411

--- Comment #11 from Martin Jansa  ---
I can confirm https://gcc.gnu.org/g:2d38f45bcca62ca0c7afef4b579f82c5c2a01610
fixes the other reproducer from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111418 as well.

Thank you for quick fix.

[Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong

2023-09-15 Thread Martin.Jansa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111411

--- Comment #12 from Martin Jansa  ---
I can confirm https://gcc.gnu.org/g:2d38f45bcca62ca0c7afef4b579f82c5c2a01610
fixes the other reproducer from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111418 as well.

Thank you for quick fix.