[Bug middle-end/113194] Hangup build ExtractAPIConsumer.cpp at -Og

2024-01-02 Thread paul.hua.gm at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113194

--- Comment #4 from Paul Hua  ---
(In reply to Andrew Pinski from comment #2)
> Works for me with r14-6875-g3a7dd24eadeb91 on x86_64:
> ./cc1plus tmp/ExtractAPIConsumer.cpp.ii -quiet -Og -fPIC
> -fno-semantic-interposition -fvisibility-inlines-hidden -fno-lifetime-dse
> -ffunction-sections -fdata-sections -fno-common -fno-strict-aliasing
> -fno-exceptions -funwind-tables -fno-rtti -Werror=date-time -Wall -Wextra
> -Wno-unused-parameter -Wwrite-strings -Wcast-qual
> -Wno-missing-field-initializers -Wpedantic -Wno-long-long
> -Wimplicit-fallthrough=3 -Wno-maybe-uninitialized -Wno-nonnull
> -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move
> -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment
> -Wno-misleading-indentation -Wctad-maybe-unsupported -Woverloaded-virtual=2
> -std=c++17

The key is "-g", with "-g" it will hangup.

[Bug c++/113194] Hangup build ExtractAPIConsumer.cpp at -Og

2024-01-01 Thread paul.hua.gm at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113194

--- Comment #1 from Paul Hua  ---
Created attachment 56972
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56972=edit
preprocessed file

[Bug c++/113194] New: Hangup build ExtractAPIConsumer.cpp at -Og

2024-01-01 Thread paul.hua.gm at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113194

Bug ID: 113194
   Summary: Hangup  build  ExtractAPIConsumer.cpp at -Og
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

build cmd on LoongArch:
cc1plus -fpreprocessed
tools/clang/lib/ExtractAPI/CMakeFiles/obj.clangExtractAPI.dir/ExtractAPIConsumer.cpp.ii
-quiet -dumpdir tools/clang/lib/ExtractAPI/CMakeFiles/obj.clangExtractAPI.dir/
-dumpbase ExtractAPIConsumer.cpp.cpp -dumpbase-ext .cpp -mabi=lp64d
-march=loongarch64 -mfpu=64 -mcmodel=normal -mtune=la464 -g -Og -Og
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings
-Wcast-qual -Wno-missing-field-initializers -Wpedantic -Wno-long-long
-Wimplicit-fallthrough=3 -Wno-maybe-uninitialized -Wno-nonnull
-Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move
-Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment
-Wno-misleading-indentation -Wctad-maybe-unsupported -Woverloaded-virtual=2
-std=c++17 -version -fdiagnostics-color=always -fPIC
-fno-semantic-interposition -fvisibility-inlines-hidden -fno-lifetime-dse
-ffunction-sections -fdata-sections -fno-common -fno-strict-aliasing
-fno-exceptions -funwind-tables -fno-rtti -o
tools/clang/lib/ExtractAPI/CMakeFiles/obj.clangExtractAPI.dir/ExtractAPIConsumer.cpp.s
 

Also Hangup on x86.

[Bug target/106459] Compiler crashing for loongarch64-linux-gnu on windows

2022-08-24 Thread paul.hua.gm at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106459

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #6 from Paul Hua  ---
Fix patch.
https://gcc.gnu.org/pipermail/gcc-patches/2022-August/600185.html

[Bug tree-optimization/94920] Failure to optimize abs pattern from arithmetic with selected operands based on comparisons with 0

2022-08-06 Thread paul.hua.gm at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94920

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #5 from Paul Hua  ---
(In reply to CVS Commits from comment #3)
> The master branch has been updated by Jakub Jelinek :
> 
> https://gcc.gnu.org/g:0bc1566dec0cab9410723c96d2ef3280fdab8e8e
> 
> commit r13-1854-g0bc1566dec0cab9410723c96d2ef3280fdab8e8e
> Author: Jakub Jelinek 
> Date:   Wed Jul 27 12:02:12 2022 +0200
> 
> testsuite: Add -Wno-psabi to pr94920 tests [PR94920]
> 
> These tests fail on ia32, because we get -Wpsabi warnings.
> Fixed by adding -Wno-psabi.  The pr94920.C test still fails the
> ABS_EXPR scan-tree-dump though, I think we'll need to add vect
> options and use vect_int effective target or something similar.

Yes, we should do. This also fails the ABS_EXPR scan-tree-dump on LoongArch.

> 
> 2022-07-27  Jakub Jelinek  
> 
> PR tree-optimization/94920
> * g++.dg/pr94920.C: Add -Wno-psabi to dg-options.
> * g++.dg/pr94920-1.C: Add dg-additional-options -Wno-psabi.

[Bug bootstrap/98616] Compile gcc 10.2.0 error for loongson 2f CPU use MIPS n32 ABI on Gentoo OS

2021-01-24 Thread paul.hua.gm at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98616

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #2 from Paul Hua  ---
Hi,

The error message show:

-
 configure: error: in
`/var/tmp/portage/sys-devel/gcc-10.2.0-r5/work/build/mips64el-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
make[2]: *** [Makefile:16845: configure-stage1-target-libgcc] Error 1
---

please see config.log for more details.

[Bug tree-optimization/93893] MIPS32r2: GCC is unable to figure out that it can use a single INS instruction instead of SLL+OR

2020-07-03 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93893

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #2 from Paul Hua  ---
(In reply to Andrew Pinski from comment #1)
> Mine for GCC 11.
> I have a patch which fixes this but won't be included until GCC 11:
> transpose_c:
> .frame  $sp,0,$31   # vars= 0, regs= 0/0, args= 0, gp= 0
> .mask   0x,0
> .fmask  0x,0
> .setnoreorder
> .setnomacro
> lw  $2,0($4)
> lw  $3,0($5)
> ins $3,$2,16,16
> jr  $31
> sw  $3,0($6)

Hi Andrew, can you send the patch to gcc-patches mail list or add to
attachment.

[Bug bootstrap/77510] genautomata memory footprint for MIPS

2020-07-03 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77510

--- Comment #5 from Paul Hua  ---
Created attachment 48830
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48830=edit
testing patch

this patch reduce reservation of model do not more than 10 cycles. The memory
of genautomata down to 1GB.

the patch modified files:

modified:   gcc/config/mips/gs464.md
modified:   gcc/config/mips/i6400.md
modified:   gcc/config/mips/m5100.md
modified:   gcc/config/mips/p5600.md
modified:   gcc/config/mips/p6600.md
modified:   gcc/config/mips/xlp.md
modified:   gcc/config/mips/xlr.md

I will do some performance test on Loongson 3A1000 (gs464) target.

If someone has other machines, pleae do some performance test.

[Bug bootstrap/77510] genautomata memory footprint for MIPS

2020-07-02 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77510

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #4 from Paul Hua  ---
I do some testing, adding scheduling description file one by one order by on
date.

fileadded date  size(M) 
5400.md 8/20/2002   13 
5500.md 8/20/2002   13 
sr71k.md8/20/2002   18 
7000.md 7/15/2003   20 
9000.md 7/15/2003   22 
sb1.md  4/21/2004   23 
4130.md 5/6/200424 
3000.md 6/24/2004   25 
4000.md 7/12/2004   25 
4100.md 7/12/2004   25 
4300.md 7/12/2004   25 
4600.md 7/12/2004   25 
5000.md 7/12/2004   26 
6000.md 7/12/2004   26 
generic.md  7/12/2004   26 
24k.md  5/9/200535 
4k.md   5/13/2005   36 
5k.md   7/29/2005   38 
74k.md  4/16/2007   42 
20kc.md 7/16/2007   46 
xlr.md  6/6/200847 
loongson2ef.md  6/15/2008   51 
octeon.md   9/21/2008   53 
1.md10/6/2008   58 
xlp.md  7/22/2012   450 
p5600.md6/5/20141370 
m5100.md7/22/2015   1382 
i6400.md7/23/2015   1502 
p6600.md6/13/2018   2393 
gs464.md11/7/2018   2403 
gs464e.md   11/7/2018   2411 
gs264e.md   11/7/2018   2419

[Bug middle-end/95830] [11 regression][MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12247 start with gcc-11-1445-g502d63b6d61

2020-06-26 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95830

Paul Hua  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #5 from Paul Hua  ---
The following testcase still fails on mips.

FAIL: gcc.target/mips/mips-ps-5.c   -O1   scan-assembler \\tc.eq.ps\\t
FAIL: gcc.target/mips/mips-ps-5.c   -O1   scan-assembler \\tmov[tf].ps\\t
FAIL: gcc.target/mips/mips-ps-5.c   -O2   scan-assembler \\tc.eq.ps\\t
FAIL: gcc.target/mips/mips-ps-5.c   -O2   scan-assembler \\tmov[tf].ps\\t
FAIL: gcc.target/mips/mips-ps-5.c   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions   scan-assembler \\tc.eq.ps\\t
FAIL: gcc.target/mips/mips-ps-5.c   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions   scan-assembler \\tmov[tf].ps\\t
FAIL: gcc.target/mips/mips-ps-5.c   -O3 -g   scan-assembler
\\tc.eq.ps\\t
FAIL: gcc.target/mips/mips-ps-5.c   -O3 -g   scan-assembler
\\tmov[tf].ps\\t
FAIL: gcc.target/mips/mips-ps-5.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none   scan-assembler \\tc.eq.ps\\t
FAIL: gcc.target/mips/mips-ps-5.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none   scan-assembler \\tmov[tf].ps\\t
FAIL: gcc.target/mips/mips-ps-5.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects   scan-assembler \\tc.eq.ps\\t
FAIL: gcc.target/mips/mips-ps-5.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects   scan-assembler \\tmov[tf].ps\\t
FAIL: gcc.target/mips/mips-ps-7.c   -O1   scan-assembler \\tc.eq.ps\\t
FAIL: gcc.target/mips/mips-ps-7.c   -O1   scan-assembler \\tmov[tf].ps\\t
FAIL: gcc.target/mips/mips-ps-7.c   -O2   scan-assembler \\tc.eq.ps\\t
FAIL: gcc.target/mips/mips-ps-7.c   -O2   scan-assembler \\tmov[tf].ps\\t
FAIL: gcc.target/mips/mips-ps-7.c   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions   scan-assembler \\tc.eq.ps\\t
FAIL: gcc.target/mips/mips-ps-7.c   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions   scan-assembler \\tmov[tf].ps\\t
FAIL: gcc.target/mips/mips-ps-7.c   -O3 -g   scan-assembler
\\tc.eq.ps\\t
FAIL: gcc.target/mips/mips-ps-7.c   -O3 -g   scan-assembler
\\tmov[tf].ps\\t
FAIL: gcc.target/mips/mips-ps-7.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none   scan-assembler \\tc.eq.ps\\t
FAIL: gcc.target/mips/mips-ps-7.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none   scan-assembler \\tmov[tf].ps\\t


$ cat mips-ps-5.i 


extern float a[] __attribute__ ((aligned (8)));
extern float b[] __attribute__ ((aligned (8)));
extern float c[] __attribute__ ((aligned (8)));

__attribute__((nomips16)) void
foo (void)
{
  int i;
  for (i = 0; i < 16; i++)
a[i] = b[i] == c[i] + 1 ? b[i] : c[i];
}

$ ./gcc/cc1 -fpreprocessed mips-ps-5.i -mel -quiet -dumpbase mips-ps-5.c
-dumpbase-ext .c -mhard-float -mdouble-float -mfp64 -mgp64 -mpaired-single
-modd-spreg -march=mips64r2 -mabi=64 -mllsc -mips64r2 -mno-shared -O1 -version
-fdiagnostics-color=never -fno-diagnostics-show-caret
-fno-diagnostics-show-line-numbers -fdiagnostics-urls=never -ftree-vectorize
-ffat-lto-objects -fno-ident -o mips-ps-5.s

old asm out :
.L2:
ldc1$f0,0($2)
ldc1$f1,0($4)
add.ps  $f2,$f1,$f3
c.eq.ps $fcc0,$f0,$f2
movf.ps $f0,$f1,$fcc0
sdc1$f0,0($3)
daddiu  $2,$2,8
daddiu  $4,$4,8
.setnoreorder
.setnomacro
bne $2,$5,.L2
daddiu  $3,$3,8
.setmacro
.setreorder

after r11-1445-g502d63b6d61 asm out:

.L2:
ldc1$f2,0($3)
ldc1$f0,0($5)
add.ps  $f3,$f0,$f5
cvt.s.pl$f1,$f2
cvt.s.pu$f2,$f2
cvt.s.pl$f4,$f3
c.eq.s  $fcc0,$f1,$f4
move$2,$6
movf$2,$0,$fcc0
sw  $2,16($sp)
cvt.s.pu$f3,$f3
c.eq.s  $fcc1,$f2,$f3
move$2,$6
movf$2,$0,$fcc1
sw  $2,20($sp)
ld  $2,16($sp)
sll $7,$2,0
dsra$2,$2,32
cvt.s.pl$f3,$f0
movz.s  $f1,$f3,$7
cvt.s.pu$f0,$f0
movn.s  $f0,$f2,$2
cvt.ps.s$f1,$f0,$f1
sdc1$f1,0($4)
daddiu  $3,$3,8
daddiu  $5,$5,8
.setnoreorder
.setnomacro
bne $3,$8,.L2
daddiu  $4,$4,8
.setmacro
.setreorder

[Bug middle-end/64242] Longjmp expansion incorrect

2020-06-23 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64242

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #40 from Paul Hua  ---
(In reply to Andrew Pinski from comment #39)
> Created attachment 47830 [details]
> MIPS patch
> 
> This is the MIPS patch, I will post it by the end of next week.

any update ?

[Bug regression/95830] [11 regression][MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12247 start with gcc-11-1445-g502d63b6d61

2020-06-22 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95830

Paul Hua  changed:

   What|Removed |Added

Summary|[10 regression][MIPS/MSA]   |[11 regression][MIPS/MSA]
   |internal compiler error: in |internal compiler error: in
   |do_store_flag, at   |do_store_flag, at
   |expr.c:12247 start with |expr.c:12247 start with
   |gcc-11-1445-g502d63b6d61|gcc-11-1445-g502d63b6d61
 CC||mliska at suse dot cz
 Target||mips
Version|10.0|11.0

--- Comment #1 from Paul Hua  ---
still fails on gcc-11-1580-gc154b8bc568.

[Bug regression/95830] New: [10 regression][MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12247 start with gcc-11-1445-g502d63b6d61

2020-06-22 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95830

Bug ID: 95830
   Summary: [10 regression][MIPS/MSA] internal compiler error: in
do_store_flag, at expr.c:12247 start with
gcc-11-1445-g502d63b6d61
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: regression
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

Since gcc-11-1445-g502d63b6d61 O3-pr45971 fails on mips.

$ cat O3-pr45971.i 

void
foo (int *x, int *y)
{
  int i;
  for (i = 0; i < 11; i++)
y[i] = (x[i] == 1) ? i + 1 : -(i + 1);
}

$ ./gcc/cc1 -fpreprocessed O3-pr45971.i -mel -quiet -dumpbase O3-pr45971.c
-dumpbase-ext .c -mmsa -march=mips64r2 -mabi=64 -mllsc -mips64r2 -mno-shared
-O2 -O3 -version -fdiagnostics-color=never -fno-diagnostics-show-caret
-fno-diagnostics-show-line-numbers -fdiagnostics-urls=never -ftree-vectorize
-fno-tree-loop-distribute-patterns -fvect-cost-model=unlimited -fno-common
-fdump-tree-vect-details -fno-ipa-cp-clone -o O3-pr45971.s


/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/vect/O3-pr45971.c: In
function ‘foo’:
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/vect/O3-pr45971.c:5:1:
internal compiler error: in do_store_flag, at expr.c:12247
0x1204fed93 do_store_flag
../../../gcc_git_trunk/gcc/expr.c:12247
0x1204ff313 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
../../../gcc_git_trunk/gcc/expr.c:9608
0x120379653 expand_gimple_stmt_1
../../../gcc_git_trunk/gcc/cfgexpand.c:3786
0x120379653 expand_gimple_stmt
../../../gcc_git_trunk/gcc/cfgexpand.c:3847
0x120380183 expand_gimple_basic_block
../../../gcc_git_trunk/gcc/cfgexpand.c:5888
0x120382dd3 execute
../../../gcc_git_trunk/gcc/cfgexpand.c:6572
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

there are many others fails start between gcc-11-1441-g48b6386f5d0 and
gcc-11-1470-gd11c9841d54. 

/gcc.dg/graphite/vect-pr43423.c:6:6: internal compiler error: in do_store_flag,
at expr.c:12247
/gcc.dg/graphite/vect-pr43423.c:6:6: internal compiler error: in do_store_flag,
at expr.c:12247
/gcc.dg/vect/pr46009.c:13:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr46009.c:13:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr62075.c:11:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr62075.c:11:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr69820.c:10:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr69820.c:10:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr86749.c:10:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr86749.c:10:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr94727.c:9:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr94727.c:9:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/vect-over-widen-13.c:19:1: internal compiler error: in
do_store_flag, at expr.c:12247
/gcc.dg/vect/vect-over-widen-13.c:19:1: internal compiler error: in
do_store_flag, at expr.c:12247
/gcc.dg/vect/vect-over-widen-15.c:20:1: internal compiler error: in
do_store_flag, at expr.c:12247
/gcc.dg/vect/vect-over-widen-15.c:20:1: internal compiler error: in
do_store_flag, at expr.c:12247
/gcc.dg/vect/vect-version-1.c:5:6: internal compiler error: in do_store_flag,
at expr.c:12247
/gcc.dg/vect/vect-version-1.c:5:6: internal compiler error: in do_store_flag,
at expr.c:12247
/gcc.dg/vect/vect-version-2.c:5:6: internal compiler error: in do_store_flag,
at expr.c:12247
/gcc.dg/vect/vect-version-2.c:5:6: internal compiler error: in do_store_flag,
at expr.c:12247
/gcc.dg/vect/pr68305.c:8:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr68305.c:8:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr68417.c:13:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr68417.c:13:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr79887.c:8:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/pr79887.c:8:1: internal compiler error: in do_store_flag, at
expr.c:12247
/gcc.dg/vect/vect-over-widen-13.c:19:1: internal compiler error: in
do_store_flag, at expr.c:12247
/gcc.dg/vect/vect-over-widen-13.c:19:1: internal compiler error: in
do_store_flag, at expr.c:12247
/gcc.dg/vect/vect-over-widen-15.c:20:1: internal compiler error: in
do_store_flag, at expr.c:12247
/gcc.dg/vect/vect-over-widen-15.c:20:1: internal compiler error: in
do_store_flag, at expr.c:12247
/gc

[Bug c/94842] [8/9 Regression] internal compiler error: in gimplify_label_expr, at gimplify.c:2573

2020-05-07 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94842

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #10 from Paul Hua  ---
ICEed on mips64el.

gcc_git_trunk/gcc/testsuite/gcc.dg/pr94842.c:8:1: internal compiler error:
Segmentation fault^M
0x1209b7233 crash_signal^M
../../../gcc_git_trunk/gcc/toplev.c:328^M
0x120a9eb85 tree_check(tree_node*, char const*, int, char const*, tree_code)^M
../../../gcc_git_trunk/gcc/tree.h:3293^M
0x120a9eb85 convert_nonlocal_reference_op^M
../../../gcc_git_trunk/gcc/tree-nested.c:1064^M
0x120d7f81f walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*))^M
../../../gcc_git_trunk/gcc/tree.c:12001^M
0x1205e5adb walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)^M
../../../gcc_git_trunk/gcc/gimple-walk.c:268^M
0x1205e5da7 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)^M
../../../gcc_git_trunk/gcc/gimple-walk.c:596^M
0x1205e610b walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)^M
../../../gcc_git_trunk/gcc/gimple-walk.c:51^M
0x1205e5f17 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)^M
../../../gcc_git_trunk/gcc/gimple-walk.c:605^M
0x1205e610b walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)^M
../../../gcc_git_trunk/gcc/gimple-walk.c:51^M
0x120a972ff walk_body^M
../../../gcc_git_trunk/gcc/tree-nested.c:713^M
0x120a972ff walk_function^M
../../../gcc_git_trunk/gcc/tree-nested.c:724^M
0x120a972ff walk_all_functions^M
../../../gcc_git_trunk/gcc/tree-nested.c:789^M
0x120aa206b lower_nested_functions(tree_node*)^M
../../../gcc_git_trunk/gcc/tree-nested.c:3551^M
0x1203c55db cgraph_node::analyze()^M
../../../gcc_git_trunk/gcc/cgraphunit.c:676^M
0x1203c995f analyze_functions^M
../../../gcc_git_trunk/gcc/cgraphunit.c:1227^M
0x1203caaf3 symbol_table::finalize_compilation_unit()^M
../../../gcc_git_trunk/gcc/cgraphunit.c:2974^M
Please submit a full bug report,^M
with preprocessed source if appropriate.^M
Please include the complete backtrace with any bug report.^M
See <https://gcc.gnu.org/bugs/> for instructions.^M
compiler exited with status 1

[Bug target/94780] [8/9 Regression] ICE in walk_body at gcc/tree-nested.c:713 since r6-3632-gf6f69fb09c5f81df

2020-05-07 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94780

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #8 from Paul Hua  ---
This also crashes on mips64el.

gcc/testsuite/gcc.dg/pr94780.c:8:1: internal compiler error: Segmentation fault
0x1209b7233 crash_signal
../../../gcc_git_trunk/gcc/toplev.c:328
0x120a9eb85 tree_check(tree_node*, char const*, int, char const*, tree_code)
../../../gcc_git_trunk/gcc/tree.h:3293
0x120a9eb85 convert_nonlocal_reference_op
../../../gcc_git_trunk/gcc/tree-nested.c:1064
0x120d7f81f walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*))
../../../gcc_git_trunk/gcc/tree.c:12001
0x1205e5adb walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
../../../gcc_git_trunk/gcc/gimple-walk.c:268
0x1205e5da7 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
../../../gcc_git_trunk/gcc/gimple-walk.c:596
0x1205e610b walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
../../../gcc_git_trunk/gcc/gimple-walk.c:51
0x1205e5f17 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
../../../gcc_git_trunk/gcc/gimple-walk.c:605
0x1205e610b walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
../../../gcc_git_trunk/gcc/gimple-walk.c:51
0x120a972ff walk_body
../../../gcc_git_trunk/gcc/tree-nested.c:713
0x120a972ff walk_function
../../../gcc_git_trunk/gcc/tree-nested.c:724
0x120a972ff walk_all_functions
../../../gcc_git_trunk/gcc/tree-nested.c:789
0x120aa206b lower_nested_functions(tree_node*)
../../../gcc_git_trunk/gcc/tree-nested.c:3551
0x1203c55db cgraph_node::analyze()
../../../gcc_git_trunk/gcc/cgraphunit.c:676
0x1203c995f analyze_functions
../../../gcc_git_trunk/gcc/cgraphunit.c:1227
0x1203caaf3 symbol_table::finalize_compilation_unit()
../../../gcc_git_trunk/gcc/cgraphunit.c:2974
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

[Bug c++/94064] New: 00 vs O1/O2/O3 different output

2020-03-05 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94064

Bug ID: 94064
   Summary: 00 vs O1/O2/O3 different output
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

#include 
#include 

class A {
public:
A() {};
int m;
};


int main() {
A* src = new A;
src->m = 10;
A* src_p = new(src) A;
printf("%d\n", src->m);
}

g++ foo.cpp -O3 -o 3
./3>> 0

g++ foo.cpp -O0 -o 0
./0>> 10

[Bug target/91474] Internal compiler error when building mabi=32 mips64-elf cross-compiler: segfault in parallel_settings.cc

2019-09-03 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91474

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #1 from Paul Hua  ---
The preprocessed file parallel_settings.ii of parallel_settings.cc should be
provided.

Look at this:
https://gcc.gnu.org/bugs/

"the preprocessed file (*.i*) that triggers the bug, generated by adding
-save-temps to the complete compilation command, or, in the case of a bug
report for the GNAT front end, a complete set of source files (see below)."

[Bug rtl-optimization/91068] New: [10 regression][MIPS] New FAIL: madd-3.c and msub-5.c start with r272849

2019-07-03 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91068

Bug ID: 91068
   Summary: [10 regression][MIPS] New FAIL: madd-3.c and msub-5.c
start with r272849
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

The follow test fails between r272831 and r272852.

FAIL: gcc.target/mips/madd-3.c   -O1   scan-assembler-times \\tmadd\\t 3
FAIL: gcc.target/mips/madd-5.c   -O1   scan-assembler-times \\tmadd\\t 4
FAIL: gcc.target/mips/madd-5.c   -O1   scan-assembler-times \\tmflo\\t 3
FAIL: gcc.target/mips/madd-9.c   -O1   scan-assembler \\tmadd\\t
FAIL: gcc.target/mips/madd-9.c   -O1   scan-assembler \\tmult\\t
FAIL: gcc.target/mips/madd-9.c   -O1   scan-assembler-not \\tmul\\t

FAIL: gcc.target/mips/msub-5.c   -O1   scan-assembler-times \\tmflo\\t 3
FAIL: gcc.target/mips/msub-5.c   -O1   scan-assembler-times \\tmsub\\t 4

bisect show start with r272849.

[Bug rtl-optimization/90357] [9/10 regression][MIPS] New FAIL: gcc.c-torture/execute/20080502-1.c -O0 start with r269880

2019-07-02 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90357

Paul Hua  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Paul Hua  ---
fixed on trunk and gcc-9-branch

[Bug rtl-optimization/90357] [9 regression][MIPS] New FAIL: gcc.c-torture/execute/20080502-1.c -O0 start with r269880

2019-05-06 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90357

--- Comment #1 from Paul Hua  ---
Fix patch:

diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 1de33b2..89fc073 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -4849,6 +4849,7 @@ mips_split_move (rtx dest, rtx src, enum mips_split_type
split_type, rtx insn_)
  can forward SRC for DEST.  This is most useful if the next insn is a
  simple store.   */
   rtx_insn *insn = (rtx_insn *)insn_;
+  struct mips_address_info addr;
   if (insn)
 {
   rtx_insn *next = next_nonnote_nondebug_insn_bb (insn);
@@ -4856,7 +4857,17 @@ mips_split_move (rtx dest, rtx src, enum mips_split_type
split_type, rtx insn_)
{
  rtx set = single_set (next);
  if (set && SET_SRC (set) == dest)
-   validate_change (next, _SRC (set), src, false);
+   {
+ if (MEM_P (src))
+   {
+ rtx tmp = XEXP (src, 0);
+ mips_classify_address (, tmp, GET_MODE (tmp), true);
+ if (REGNO (addr.reg) != REGNO (dest))
+   validate_change (next, _SRC (set), src, false);
+   }
+ else
+   validate_change (next, _SRC (set), src, false);
+   }
}
 }
 }

[Bug rtl-optimization/90357] New: [9 regression][MIPS] New FAIL: gcc.c-torture/execute/20080502-1.c -O0 start with r269880

2019-05-06 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90357

Bug ID: 90357
   Summary: [9 regression][MIPS] New FAIL:
gcc.c-torture/execute/20080502-1.c  -O0  start with
r269880
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

Created attachment 46300
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46300=edit
preprocessed .i file

Hi:

There are some regressions start with r269880. The r269880 try to forward SRC
into the next instruction. Take 20080502-1.c as a example, it fails cause they
use the same reg between src and dest.

good asm:
 81 ld  $2,%got_page(.LC1)($28)
 82 ld  $3,%got_ofst(.LC1+8)($2)
 83 ld  $2,%got_ofst(.LC1)($2)
 84 dmtc1   $2,$f12
 85 dmtc1   $3,$f13

after r269880:
 81 ld  $2,%got_page(.LC1)($28)
 82 ld  $3,%got_ofst(.LC1+8)($2)
 83 ld  $2,%got_ofst(.LC1)($2)
 84 ldc1$f12,%got_ofst(.LC1)($2)
 85 ldc1$f13,%got_ofst(.LC1+8)($2)

The line 83 $2 is dead, line 84 get the wrong address.

build cmd:
cc1 -fpreprocessed 20080502-1.i -mel -quiet -dumpbase 20080502-1.c
-march=mips64r2 -mabi=64 -mllsc -mips64r2 -mno-shared -auxbase 20080502-1 -O0
-w -version -fdiagnostics-color=never -fno-diagnostics-show-caret
-fno-diagnostics-show-line-numbers -o 20080502-1.s

[Bug target/89623] Can't build mips-wrs-vxworks cross-compiler

2019-04-08 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89623

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #2 from Paul Hua  ---
fixed on trunk.

[Bug target/89378] [9 regression][MIPS] FAIL: gcc.dg/vect/pr88598-3.c -mmsa (internal compiler error)

2019-03-14 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89378

--- Comment #4 from Paul Hua  ---
(In reply to Jakub Jelinek from comment #3)
> Created attachment 45960 [details]
> gcc9-pr89378.patch
> 
> Untested (quite obvious) fix, though I don't really have a way to test this.
> If you could test this, I can submit it to gcc-patches.
> 
> In RTL, a SUBREG of a SUBREG is invalid, and gen_lowpart is a function that
> takes care of all the folding to get the right single SUBREG.

The attachment patch fix the bug.

Bootstrap and test passed, please submit the patch. Thanks for fix this bug.

[Bug rtl-optimization/89378] [9 regression][MIPS] FAIL: gcc.dg/vect/pr88598-3.c -mmsa (internal compiler error)

2019-02-19 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89378

--- Comment #2 from Paul Hua  ---
(In reply to Richard Biener from comment #1)
> MSA is new, so not sure if it is a regression.  Please fill out
> known-to-work.

r267643 not iced, but fails to optimize the code.

f1:
.frame  $sp,16,$31  # vars= 0, regs= 1/0, args= 0, gp= 0
.mask   0x1000,-8
.fmask  0x,0
daddiu  $sp,$sp,-16
sd  $28,8($sp)
lui $28,%hi(%neg(%gp_rel(f1)))
daddu   $28,$28,$25
daddiu  $28,$28,%lo(%neg(%gp_rel(f1)))
dla $2,a
ld.w$w0,0($2)
dla $2,.LC0
ld.w$w1,0($2)
fmul.w  $w0,$w0,$w1
move.v  $w2,$w0
sldi.b  $w2,$w0[4]
mov.s   $f3,$f2
move.v  $w1,$w0
move.v  $w2,$w0
sldi.b  $w2,$w0[8]
add.s   $f0,$f0,$f3
sldi.b  $w1,$w1[12]
add.s   $f0,$f0,$f2
add.s   $f0,$f0,$f1
ld  $28,8($sp)
.setnoreorder
.setnomacro
j   $31
daddiu  $sp,$sp,16
.setmacro
.setreorder

r267646 iced.

[Bug rtl-optimization/89378] New: [9 regression][MIPS] FAIL: gcc.dg/vect/pr88598-3.c -mmsa (internal compiler error)

2019-02-16 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89378

Bug ID: 89378
   Summary: [9 regression][MIPS] FAIL: gcc.dg/vect/pr88598-3.c
-mmsa (internal compiler error)
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

Created attachment 45741
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45741=edit
preprocessed .i file

~/build/gcc-r267646_obj/gcc/cc1  -fpreprocessed pr88598-3.i -mel -quiet
-dumpbase pr88598-3.c -mmsa -march=mips64r2 -mabi=64 -mllsc -mips64r2
-mno-shared -auxbase pr88598-3 -O2 -version -fdiagnostics-color=never
-fno-diagnostics-show-caret -fno-d
iagnostics-show-line-numbers -ftree-vectorize -fvect-cost-model=unlimited
-fno-common -fdump-tree-vect-details -ffast-math -fdump-tree-optimized -o
r267646.s  -fdump-rtl-all-all -fdump-tree-all-all   
GNU C17 (GCC) version 9.0.0 20190107 (experimental) (mips64el-linux-gnu)
compiled by GNU C version 5.5.0, GMP version 6.1.2, MPFR version 3.1.5,
MPC version 1.0.3, isl version none 
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 
GNU C17 (GCC) version 9.0.0 20190107 (experimental) (mips64el-linux-gnu)
compiled by GNU C version 5.5.0, GMP version 6.1.2, MPFR version 3.1.5,
MPC version 1.0.3, isl version none 
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 
Compiler executable checksum: 2965e89c54734745a02038847659e86a  
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/vect/pr88598-3.c: In
function ‘f1’:  
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/vect/pr88598-3.c:17:1:
error: unrecognizable insn: 
(insn 15 14 16 2 (set (reg:V16QI 212)   
(subreg:V16QI (subreg:V4SF (reg:V4SI 201 [ _31 ]) 0) 0))
"/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/vect/pr88598-3.c":16:10
-1  
 (nil)) 
during RTL pass: vregs  
dump file: pr88598-3.c.234r.vregs   
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/vect/pr88598-3.c:17:1:
internal compiler error: in extract_insn, at recog.c:2305   
0x541354 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*) 
/home/paulhua/gcc_git_trunk/gcc/rtl-error.c:108 
0x541370 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)   
/home/paulhua/gcc_git_trunk/gcc/rtl-error.c:116 
0xaf7a33 extract_insn(rtx_insn*)
/home/paulhua/gcc_git_trunk/gcc/recog.c:2305
0x882aab instantiate_virtual_regs_in_insn   
/home/paulhua/gcc_git_trunk/gcc/function.c:1650 
0x882aab instantiate_virtual_regs   
/home/paulhua/gcc_git_trunk/gcc/function.c:2020 
0x882aab execute
/home/paulhua/gcc_git_trunk/gcc/function.c:2069 
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

[Bug rtl-optimization/87761] [9 regression][MIPS] New FAIL: gcc.target/mips/fix-r4000-10.c -O1 start with r265398

2019-02-11 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87761

--- Comment #5 from Paul Hua  ---
(In reply to Jakub Jelinek from comment #4)
> Can you please recheck with current trunk, many RA improvements related to
> r265398 change went into trunk since then.

all those test still fails on trunk.

[Bug middle-end/64242] Longjmp expansion incorrect

2018-12-05 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64242

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #19 from Paul Hua  ---
It's fails on mips64el-unknown-linux-gnu

FAIL: gcc.c-torture/execute/pr64242.c   -O2  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -Os  execution test

[Bug rtl-optimization/88349] [9 regression][MIPS] Redundant store instructions generated start with r266385

2018-12-04 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88349

--- Comment #1 from Paul Hua  ---
paulhua@gcc122:~/test/debug_msa$ cat v16i8_cmpi.i
typedef signed char v16i8 __attribute__ ((vector_size(16)));
v16i8 test31_s_v16i8 (v16i8 i) {
return i < 5;
}

good asm:

test31_s_v16i8:
.frame  $sp,16,$31  # vars= 0, regs= 1/0, args= 0, gp= 0
.mask   0x1000,-8
.fmask  0x,0
daddiu  $sp,$sp,-16
sd  $28,8($sp)
lui $28,%hi(%neg(%gp_rel(test31_s_v16i8)))
daddu   $28,$28,$25
daddiu  $28,$28,%lo(%neg(%gp_rel(test31_s_v16i8)))
insert.d$w0[0],$4
insert.d$w0[1],$5
clti_s.b$w0,$w0,5
copy_s.d$2,$w0[0]
copy_s.d$3,$w0[1]
ld  $28,8($sp)
.setnoreorder
.setnomacro
j   $31
daddiu  $sp,$sp,16

bad asm:

test31_s_v16i8:
.frame  $sp,32,$31  # vars= 16, regs= 1/0, args= 0, gp= 0
.mask   0x1000,-8
.fmask  0x,0
daddiu  $sp,$sp,-32
sd  $28,24($sp)
lui $28,%hi(%neg(%gp_rel(test31_s_v16i8)))
daddu   $28,$28,$25
daddiu  $28,$28,%lo(%neg(%gp_rel(test31_s_v16i8)))
insert.d$w0[0],$4
insert.d$w0[1],$5
clti_s.b$w0,$w0,5
st.b$w0,0($sp)
copy_s.d$2,$w0[0]
copy_s.d$3,$w0[1]
ld  $28,24($sp)
.setnoreorder
.setnomacro
j   $31
daddiu  $sp,$sp,32

cmd:

 ~/build/gcc-r266385_obj/gcc/cc1 -fpreprocessed v16i8_cmpi.i -mel -quiet
-dumpbase v16i8_cmpi.c -mmsa -march=mips64r2 -mabi=64 -mllsc -mips64r2
-mno-shared -auxbase v16i8_cmpi -O1 -version -o  bad.s

[Bug rtl-optimization/88349] New: [9 regression][MIPS] Redundant store instructions generated start with r266385

2018-12-04 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88349

Bug ID: 88349
   Summary: [9 regression][MIPS]  Redundant store instructions
generated start with r266385
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

paulhua@gcc122:~/test/debug_mult-16$ cat mult-16.i
typedef int DI __attribute__((mode(DI)));
typedef int SI __attribute__((mode(SI)));

__attribute__((mips16)) SI
f (SI x, SI y)
{
  return ((DI) x * y) >> 32;
}

good asm:

f:
.frame  $sp,0,$31   # vars= 0, regs= 0/0, args= 0, gp= 0
.mask   0x,0
.fmask  0x,0
mult$4,$5
mfhi$3
.setnoreorder
.setnomacro
jr  $31
move$2,$3
.setmacro
.setreorder

bad asm:

f:
.frame  $sp,16,$31  # vars= 8, regs= 0/0, args= 0, gp= 8
.mask   0x,0
.fmask  0x,0
addiu   $sp,-16
mult$4,$5
mflo$2
mfhi$3
sw  $2,8($sp)
sw  $3,12($sp)
lw  $2,12($sp)
.setnoreorder
.setnomacro
jr  $31
addiu   $sp,16
.setmacro
.setreorder

cmd:

paulhua@gcc122:~/test/debug_mult-16$ ~/build/gcc-r266385_obj/gcc/cc1
-fpreprocessed mult-16.i -mel -quiet -dumpbase mult-16.c -mabi=32 -mgp32
-mlong32 -mno-micromips -march=mips64r2 -mllsc -mips64r2 -mno-shared
-auxbase-strip mult-16.s -O1 -version -fdiagnostics-color=never
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fexpensive-optimizations -ffat-lto-objects -fno-ident -o new.s

cross-gcc configure:
configure MISSING=texinfo MAKEINFO=missing --target=mips64el-linux-gnu
--enable-languages=c,c++

[Bug rtl-optimization/88179] New: [9 regression][MIPS] pr84941.c ICE in lra_eliminate_reg_if_possible at lra-eliminations.c:1393 start with r266385

2018-11-23 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88179

Bug ID: 88179
   Summary: [9 regression][MIPS]  pr84941.c ICE in
lra_eliminate_reg_if_possible at
lra-eliminations.c:1393  start with r266385
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

./build/gcc/cc1 -fpreprocessed pr84941.i -mel -quiet -dumpbase pr84941.c
-march=mips64r2 -mabi=64 -mllsc -mips64r2 -mno-shared -auxbase-strip pr84941.s
-O2 -version -o pr84941.s
GNU C17 (GCC) version 9.0.0 20181122 (experimental) (mips64el-linux-gnu)
compiled by GNU C version 6.3.0 20170516, GMP version 6.1.2, MPFR
version 3.1.5, MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C17 (GCC) version 9.0.0 20181122 (experimental) (mips64el-linux-gnu)
compiled by GNU C version 6.3.0 20170516, GMP version 6.1.2, MPFR
version 3.1.5, MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: b095a3a071065c8cb9dc75b4f940fa0d
during RTL pass: reload
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/pr84941.c: In function
‘foo’:
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/pr84941.c:10:1:
internal compiler error: in lra_eliminate_reg_if_possible, at
lra-eliminations.c:1393
0xa00930 lra_eliminate_reg_if_possible(rtx_def**)
/home/paulhua/gcc_git_trunk/gcc/lra-eliminations.c:1393
0x9ed66d address_eliminator
/home/paulhua/gcc_git_trunk/gcc/lra-constraints.c:362
0x9ed755 satisfies_address_constraint_p
/home/paulhua/gcc_git_trunk/gcc/lra-constraints.c:411
0x9f4396 satisfies_address_constraint_p
/home/paulhua/gcc_git_trunk/gcc/lra-constraints.c:423
0x9f4396 process_alt_operands
/home/paulhua/gcc_git_trunk/gcc/lra-constraints.c:2305
0x9fad7d curr_insn_transform
/home/paulhua/gcc_git_trunk/gcc/lra-constraints.c:3904
0x9fdd86 lra_constraints(bool)
/home/paulhua/gcc_git_trunk/gcc/lra-constraints.c:4921
0x9e5d94 lra(_IO_FILE*)
/home/paulhua/gcc_git_trunk/gcc/lra.c:2446
0x997589 do_reload
/home/paulhua/gcc_git_trunk/gcc/ira.c:5469
0x997589 execute
/home/paulhua/gcc_git_trunk/gcc/ira.c:5653
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


paulhua@gcc122:~/build/gcc-bisect$ cat pr84941.i
# 1 "/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/pr84941.c"
# 1 ""
# 1 ""
# 31 ""
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 32 "" 2
# 1 "/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/pr84941.c"




void
foo (void)
{
  short *b[1] = { 0 };
  asm volatile ("" : "=m,m" (b), "=r,r" (b) : "1,p" (b));
}


cross-compile configure with:
../configure MISSING=texinfo MAKEINFO=missing --target=mips64el-linux-gnu
--enable-languages=c,c++

[Bug rtl-optimization/87761] [9 regression][MIPS] New FAIL: gcc.target/mips/fix-r4000-10.c -O1 start with r265398

2018-10-26 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87761

--- Comment #2 from Paul Hua  ---
and and new fails:
  716 FAIL: gcc.target/mips/octeon-exts-3.c   -O2   scan-assembler-times
\\texts\\t 3
  717 FAIL: gcc.target/mips/octeon-exts-3.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none   scan-assembler-times \\texts\\t 3
  718 FAIL: gcc.target/mips/octeon-exts-3.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects   scan-assembler-times \\texts\\t 3
  719 FAIL: gcc.target/mips/octeon-exts-3.c   -O3 -g   scan-assembler-times
\\texts\\t 3
  720 FAIL: gcc.target/mips/octeon-exts-3.c   -Os   scan-assembler-times
\\texts\\t 3 

$cat octeon-exts-3.i

# 1
"/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/octeon-exts-3.c"
# 1 ""
# 1 ""
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "" 2
# 1
"/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/octeon-exts-3.c"

struct foo
{
  unsigned long long a:10;
  unsigned long long b:32;
  unsigned long long c:22;
};

__attribute__((nomips16)) unsigned
f (struct foo s)
{
  return s.b;
}

struct bar
{
  unsigned long long a:15;
  unsigned long long b:48;
  unsigned long long c:1;
};

__attribute__((nomips16)) int
g (struct bar s)
{
  return (int) s.b;
}

__attribute__((nomips16)) int
h (int i)
{
  return (i << 4) >> 24;
}


./gcc/cc1 -fpreprocessed octeon-exts-3.i -mel -quiet -dumpbase octeon-exts-3.c
-march=octeon -mgp64 -mno-micromips -mabi=64 -mllsc -mips64r2 -mno-shared
-auxbase-strip octeon-exts-3.s -O2 -version -fdiagnostics-color=never
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-ffat-lto-objects -fno-ident -o octeon-exts-3.s -mno-abicalls

good :

h:
.frame  $sp,0,$31   # vars= 0, regs= 0/0, args= 0, gp= 0
.mask   0x,0
.fmask  0x,0
.setnoreorder
.setnomacro
jr  $31
exts$2,$4,20,7
.setmacro
.setreorder

bad:

h:
.frame  $sp,0,$31   # vars= 0, regs= 0/0, args= 0, gp= 0
.mask   0x,0
.fmask  0x,0
sll $2,$4,4
.setnoreorder
.setnomacro
jr  $31
sra $2,$2,24
.setmacro
.setreorder

[Bug rtl-optimization/87761] [9 regression][MIPS] New FAIL: gcc.target/mips/fix-r4000-10.c -O1 start with r265398

2018-10-26 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87761

--- Comment #1 from Paul Hua  ---
and other new fails:

  681 FAIL: gcc.target/mips/fpr-moves-5.c   -O1   scan-assembler
\\tsdc1\\t\$f12,0(\$6)\\n   
  682 FAIL: gcc.target/mips/fpr-moves-5.c   -O1   scan-assembler
\\tsdc1\\t\$f13,8(\$6)\\n   
  683 FAIL: gcc.target/mips/fpr-moves-5.c   -O2   scan-assembler
\\tsdc1\\t\$f12,0(\$6)\\n   
  684 FAIL: gcc.target/mips/fpr-moves-5.c   -O2   scan-assembler
\\tsdc1\\t\$f13,8(\$6)\\n   
  685 FAIL: gcc.target/mips/fpr-moves-5.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none   scan-assembler \\tsdc1\\t\$f12,0(\$6)\\n 
  686 FAIL: gcc.target/mips/fpr-moves-5.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none   scan-assembler \\tsdc1\\t\$f13,8(\$6)\\n 
  687 FAIL: gcc.target/mips/fpr-moves-5.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects   scan-assembler \\tsdc1\\t\$f12,0(\$6)\\n 
  688 FAIL: gcc.target/mips/fpr-moves-5.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects   scan-assembler \\tsdc1\\t\$f13,8(\$6)\\n 
  689 FAIL: gcc.target/mips/fpr-moves-5.c   -O3 -g   scan-assembler
\\tsdc1\\t\$f12,0(\$6)\\n   
  690 FAIL: gcc.target/mips/fpr-moves-5.c   -O3 -g   scan-assembler
\\tsdc1\\t\$f13,8(\$6)\\n   
  691 FAIL: gcc.target/mips/fpr-moves-5.c   -Os   scan-assembler
\\tsdc1\\t\$f12,0(\$6)\\n   
  692 FAIL: gcc.target/mips/fpr-moves-5.c   -Os   scan-assembler
\\tsdc1\\t\$f13,8(\$6)\\n   


$ cat fpr-moves-5.i

# 1
"/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/fpr-moves-5.c"
# 1 ""
# 1 ""
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "" 2
# 1
"/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/fpr-moves-5.c"




__attribute__((nomips16)) void
foo (long double d, long double *x)
{
  *x = d;
}

__attribute__((nomips16)) long double
bar (long double d, long double *x)
{
  register long double l1 asm ("$8") = d;
  register long double l2 asm ("$10") = x[1];
  register long double l3 asm ("$f20") = 0.0;
  asm ("#foo" : "=d" (l1) : "d" (l1));
  asm ("#foo" : "=d" (l2) : "d" (l2));
  asm volatile ("#foo" :: "f" (l3));
  x[1] = l1;
  return l2;
}

$./cc1 -fpreprocessed fpr-moves-5.i -mel -quiet -dumpbase fpr-moves-5.c
-mabi=64 -mhard-float -mgp64 -mlong64 -march=mips64r2 -mllsc -mips64r2
-mno-shared -auxbase-strip fpr-moves-5.s -O1 -version -fdiagnostics-color=never
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-ffat-lto-objects -fno-ident -o fpr-moves-5.s


good asm:

foo:
.frame  $sp,0,$31   # vars= 0, regs= 0/0, args= 0, gp= 0
.mask   0x,0
.fmask  0x,0
.setnoreorder
.setnomacro
sdc1$f12,0($6)
jr  $31
sdc1$f13,8($6)

bad asm:

foo:
.frame  $sp,0,$31   # vars= 0, regs= 0/0, args= 0, gp= 0
.mask   0x,0
.fmask  0x,0
.setnoreorder
.setnomacro
dmfc1   $2,$f12
dmfc1   $3,$f13
sd  $2,0($6)
jr  $31
sd  $3,8($6)

[Bug rtl-optimization/87761] New: [9 regression][MIPS] New FAIL: gcc.target/mips/fix-r4000-10.c -O1 start with r265398

2018-10-26 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87761

Bug ID: 87761
   Summary: [9 regression][MIPS] New FAIL:
gcc.target/mips/fix-r4000-10.c   -O1 start with
r265398
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

paulhua@gcc122:~/debug_r265398$ cat fix-r4000-10.i
# 1
"/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/fix-r4000-10.c"
# 1 ""
# 1 ""
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "" 2
# 1
"/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/fix-r4000-10.c"





typedef unsigned long long uint64_t;
typedef unsigned int uint128_t __attribute__((mode(TI)));
__attribute__((nomips16)) uint128_t foo (uint64_t x, uint64_t y) { return
(uint128_t) x * y; }


paulhua@gcc122:~/debug_r265398$ ~/build/gcc_397_obj/gcc/cc1 -fpreprocessed
fix-r4000-10.i -mel -quiet -dumpbase fix-r4000-10.c -dp -mips3 -mgp64
-mno-micromips -mno-mips3d -mno-dsp -mno-dspr2 -mfix-r4000 -mno-paired-single
-mno-synci -mnan=legacy -mabi=64 -mllsc -mno-shared -auxbase-strip
fix-r4000-10.s -O1 -version -fdiagnostics-color=never
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fno-split-wide-types -ffat-lto-objects -fno-ident -o fix-r4000-10.s
-mno-abicalls

good:
paulhua@gcc122:~/debug_r265398$ cat fix-r4000-10.s 
.file   1 "fix-r4000-10.c"
.section .mdebug.abi64
.previous
.nanlegacy
.gnu_attribute 4, 1
.text
.align  2
.globl  foo
.setnomips16
.entfoo
.type   foo, @function
foo:
.frame  $sp,0,$31   # vars= 0, regs= 0/0, args= 0, gp= 0
.mask   0x,0
.fmask  0x,0
dmultu  $4,$5# 17   [c=48 l=12]  umulditi3_r4000
mflo$2
mfhi$3
jr  $31  # 39   [c=0 l=8]  *simple_return
.endfoo
.size   foo, .-foo

after r265398 bad asm:
paulhua@gcc122:~/debug_r265398$ cat fix-r4000-10.s 

.file   1 "fix-r4000-10.c"
.section .mdebug.abi64
.previous
.nanlegacy
.text
.align  2
.globl  foo
.setnomips16
.entfoo
.type   foo, @function
foo:
.frame  $sp,0,$31   # vars= 0, regs= 0/0, args= 0, gp= 0
.mask   0x,0
.fmask  0x,0
move$6,$5# 34   [c=4 l=4]  *movdi_64bit/0
move$2,$4# 10   [c=4 l=4]  *movdi_64bit/0
dmultu  $2,$6# 17   [c=48 l=12]  umulditi3_r4000
mflo$2
mfhi$3
jr  $31  # 43   [c=0 l=8]  *simple_return
.endfoo
.size   foo, .-foo

[Bug rtl-optimization/87720] [9 Regression] [MIPS] ICE: gcc.c-torture/execute/builtins/lib/chk.c:33:1: in int_mode_for_mode, at stor-layout.c:403 after r265398

2018-10-24 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87720

--- Comment #2 from Paul Hua  ---
untested patch:

Index: gcc/combine.c
===
--- gcc/combine.c   (revision 265456)
+++ gcc/combine.c   (working copy)
@@ -14965,7 +14965,11 @@
  if (TEST_HARD_REG_BIT (fixed_reg_set, REGNO (src)))
continue;

- rtx new_reg = gen_reg_rtx (GET_MODE (dest));
+ rtx new_reg;
+ if (GET_CODE(dest) == PC)
+   new_reg = gen_reg_rtx (GET_MODE (src));
+ else
+   new_reg = gen_reg_rtx (GET_MODE (dest));
  rtx_insn *insn1 = gen_move_insn (new_reg, src);
  rtx_insn *insn2 = gen_move_insn (dest, new_reg);
  emit_insn_after (insn1, insn);
Index: gcc/expr.c
===
--- gcc/expr.c  (revision 265456)
+++ gcc/expr.c  (working copy)
@@ -3684,7 +3684,12 @@
 rtx_insn *
 emit_move_insn_1 (rtx x, rtx y)
 {
-  machine_mode mode = GET_MODE (x);
+  machine_mode mode;
+  if (GET_CODE (x) == PC)
+mode = GET_MODE (y);
+  else /* Include  (GET_CODE (y) = PC) */
+mode = GET_MODE (x);
+
   enum insn_code code;

   gcc_assert ((unsigned int) mode < (unsigned int) MAX_MACHINE_MODE);

[Bug regression/87720] [MIPS] ICE: gcc.c-torture/execute/builtins/lib/chk.c:33:1: in int_mode_for_mode, at stor-layout.c:403 after r265398

2018-10-24 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87720

Paul Hua  changed:

   What|Removed |Added

 Target||mips

--- Comment #1 from Paul Hua  ---
This can be reproduced by cross-compiler.

configure with:
../configure --target=mips64el-linux-gnu --enable-languages=c,c++

and simple test case:

$ cat longjmp.i
# 1 "longjmp.c"
# 1 ""
# 1 ""
# 31 ""
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 32 "" 2
# 1 "longjmp.c"
# 16 "longjmp.c"
typedef void *jmp_buf;
jmp_buf buf;



void do_jump(void) {
  __builtin_longjmp(buf, 1);
}



void f(void);

void do_setjmp(void) {
  if (!__builtin_setjmp(buf))
f();
}


gcc/cc1 -fpreprocessed longjmp.i -mel -quiet -dumpbase longjmp.c
-march=mips64r2 -mllsc -mno-madd4 -mips64r2 -mabi=64 -auxbase-strip longjmp.o
-O2 -version -o longjmp.s

during RTL pass: combine
longjmp.c: In function ‘do_jump’:
longjmp.c:27:1: internal compiler error: in int_mode_for_mode, at
stor-layout.c:403
   27 | }
  | ^
0x12089698f int_mode_for_mode(machine_mode)
../../../gcc_git_trunk/gcc/stor-layout.c:403
0x120462cff emit_move_via_integer
../../../gcc_git_trunk/gcc/expr.c:3361
0x120473a43 emit_move_insn_1(rtx_def*, rtx_def*)
../../../gcc_git_trunk/gcc/expr.c:3722
0x12047b50f gen_move_insn(rtx_def*, rtx_def*)
../../../gcc_git_trunk/gcc/expr.c:3810
0x12104b303 make_more_copies
../../../gcc_git_trunk/gcc/combine.c:14969
0x12104b303 rest_of_handle_combine
../../../gcc_git_trunk/gcc/combine.c:14984
0x12104b303 execute
../../../gcc_git_trunk/gcc/combine.c:15039
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug regression/87720] New: [MIPS] ICE: gcc.c-torture/execute/builtins/lib/chk.c:33:1: in int_mode_for_mode, at stor-layout.c:403 after r265398

2018-10-24 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87720

Bug ID: 87720
   Summary: [MIPS] ICE:
gcc.c-torture/execute/builtins/lib/chk.c:33:1: in
int_mode_for_mode, at stor-layout.c:403 after r265398
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: regression
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

Created attachment 44885
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44885=edit
preprocessed .i file

/home/xuchenghua/GCC/test/gcc-r265420_obj/gcc/cc1 -fpreprocessed
memcpy-chk-lib.i -mel -quiet -dumpbase memcpy-chk-lib.c -march=mips64r2
-mabi=64 -mllsc -mips64r2 -mno-shared -auxbase memcpy-chk-lib -O1 -w -version
-fdiagnostics-color=never -fno-diagnostics-show-caret
-fno-diagnostics-show-line-numbers -fno-tree-loop-distribute-patterns
-fno-tracer -o memcpy-chk-lib.s 
GNU C17 (gcc trunk r265420 with mips64r2 n64) version 9.0.0 20181023
(experimental) (mips64el-linux-gnu)
   
 compiled by GNU C
version 9.0.0 20181023 (experimental), GMP version 6.1.2, MPFR version 3.1.5,
MPC version 1.0.3, isl version none 
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
   
   
  GNU C17 (gcc trunk r265420 with
mips64r2 n64) version 9.0.0 20181023 (experimental) (mips64el-linux-gnu)   
   
   
  compiled by GNU C version 9.0.0 20181023 (experimental), GMP
version 6.1.2, MPFR version 3.1.5, MPC version 1.0.3, isl version none  
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 
Compiler executable checksum: 7ce7412cdce432471eecf7d33f867911  
during RTL pass: combine
In file included from
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk-lib.c:1:
 
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c:
In function ‘__chk_fail’:   
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c:33:1:
internal compiler error: in int_mode_for_mode, at stor-layout.c:403 
0x12089698f int_mode_for_mode(machine_mode) 
../../../gcc_git_trunk/gcc/stor-layout.c:403
0x120462cff emit_move_via_integer   
../../../gcc_git_trunk/gcc/expr.c:3361  
0x120473a43 emit_move_insn_1(rtx_def*, rtx_def*)
../../../gcc_git_trunk/gcc/expr.c:3722  
0x12047b50f gen_move_insn(rtx_def*, rtx_def*)   
../../../gcc_git_trunk/gcc/expr.c:3810  
0x12104b303 make_more_copies
../../../gcc_git_trunk/gcc/combine.c:14969  
0x12104b303 rest_of_handle_combine 
   
   
 
../../../gcc_git_trunk/gcc/combine.c:14984  
0x12104b303 execute
   
   
 
../../../gcc_git_trunk/gcc/combine.c:15039  
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.  
See <https://gcc.gnu.org/bugs/> for instructions.

[Bug target/87156] [9 Regression] ICE building libstdc++ for mips64

2018-09-29 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87156

--- Comment #4 from Paul Hua  ---
(In reply to Jan Hubicka from comment #3)
> Does the attached patch fix the bootstrap?
> Index: cgraphclones.c
> ===
> --- cgraphclones.c  (revision 264180)
> +++ cgraphclones.c  (working copy)
> @@ -967,6 +967,8 @@ cgraph_node::create_version_clone_with_b
>SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl));
>SET_DECL_RTL (new_decl, NULL);
>  
> +  DECL_VIRTUAL_P (new_decl) = 0;
> +
>/* When the old decl was a con-/destructor make sure the clone isn't.  */
>DECL_STATIC_CONSTRUCTOR (new_decl) = 0;
>DECL_STATIC_DESTRUCTOR (new_decl) = 0;

Yes, fixed. Thanks.

[Bug target/87156] [9 Regression] ICE building libstdc++ for mips64

2018-09-04 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87156

Paul Hua  changed:

   What|Removed |Added

 CC||hubicka at ucw dot cz,
   ||paul.hua.gm at gmail dot com

--- Comment #1 from Paul Hua  ---
confirmed.

cced: Jan Hubicka 

[Bug regression/86304] New: [9 regression][MIPS] FAIL: gcc.dg/vect/pr79887.c -mmsa (internal compiler error) starting with r261740

2018-06-25 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86304

Bug ID: 86304
   Summary: [9 regression][MIPS] FAIL: gcc.dg/vect/pr79887.c
-mmsa (internal compiler error) starting with r261740
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: regression
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

Created attachment 44318
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44318=edit
preprocessed .i file

/home/xuchenghua/GCC/test/gcc-r261994-3a_obj/gcc/cc1 -fpreprocessed pr79887.i
-mel -quiet -dumpbase pr79887.c -mmsa -march=mips64r2 -mabi=64 -mllsc -mips64r2
-mno-shared -auxbase-strip pr79887.s -O2 -version -fdiagnostics-color=never
-fno-diagnostics-show-caret -ftree-vectorize -fvect-cost-model=unlimited
-fno-common -fdump-tree-vect-details -fno-trapping-math -o pr79887.s --param
vect-epilogues-nomask=1
GNU C17 (gcc trunk r261994 mips64el o32 n32 n64) version 9.0.0 20180624
(experimental) (mips64el-linux-gnu)
compiled by GNU C version 9.0.0 20180624 (experimental), GMP version
6.0.0, MPFR version 3.1.2, MPC version 1.0.2, isl version none
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C17 (gcc trunk r261994 mips64el o32 n32 n64) version 9.0.0 20180624
(experimental) (mips64el-linux-gnu)
compiled by GNU C version 9.0.0 20180624 (experimental), GMP version
6.0.0, MPFR version 3.1.2, MPC version 1.0.2, isl version none
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 1af6f302eecac9296cae2767584f1008
during RTL pass: expand
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/vect/pr79887.c: In
function 'foo':
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/vect/pr79887.c:8:1:
internal compiler error: in expand_LOOP_VECTORIZED, at internal-fn.c:2430
0x12012172f expand_LOOP_VECTORIZED
../../../gcc_git_trunk/gcc/internal-fn.c:2430
0x1202d5537 expand_call_stmt
../../../gcc_git_trunk/gcc/cfgexpand.c:2596
0x1202d5537 expand_gimple_stmt_1
../../../gcc_git_trunk/gcc/cfgexpand.c:3575
0x1202d5537 expand_gimple_stmt
../../../gcc_git_trunk/gcc/cfgexpand.c:3734
0x1202d8327 expand_gimple_basic_block
../../../gcc_git_trunk/gcc/cfgexpand.c:5765
0x1202dda8f execute
../../../gcc_git_trunk/gcc/cfgexpand.c:6368
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

bisected show this bug starting with r261740.
preprocessed .i file are attached.

[Bug target/86067] [MIPS] ICE: scal-to-vec1.c:86:1: error: unrecognizable insn with -march=loongson3a

2018-06-13 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86067

Paul Hua  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Paul Hua  ---
r261538 | paulhua | 2018-06-13 14:50:12 +0800 (Wed, 13 Jun 2018) | 6 lines

2018-06-13  Chenghua Xu 

PR target/86076
* config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
operands[2] instead of operands[1].

[Bug target/86067] [MIPS] ICE: scal-to-vec1.c:86:1: error: unrecognizable insn with -march=loongson3a

2018-06-06 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86067

--- Comment #2 from Paul Hua  ---
(In reply to Richard Biener from comment #1)
> Which GCC version did you use?

the trunk version (r261200)

It's also ICEed on gcc-7 and gcc-8.

[Bug c/86067] New: [MIPS] ICE: scal-to-vec1.c:86:1: error: unrecognizable insn with -march=loongson3a

2018-06-06 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86067

Bug ID: 86067
   Summary: [MIPS] ICE: scal-to-vec1.c:86:1: error: unrecognizable
insn with -march=loongson3a
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

Created attachment 44239
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44239=edit
preprocessed .i file

/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.c-torture/execute/scal-to-vec1.c:
In function ‘main’:
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.c-torture/execute/scal-to-vec1.c:86:1:
error: unrecognizable insn:
(insn 69 68 70 2 (set (reg:V4HI 541)
(unspec:V4HI [
(reg:SI 543)
(subreg/s/u:HI (reg:DI 195 [ _2 ]) 0)
(const_int 0 [0])
] UNSPEC_LOONGSON_PINSRH))
"/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.c-torture/execute/scal-to-vec1.c":45
-1
 (nil))
during RTL pass: vregs
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.c-torture/execute/scal-to-vec1.c:86:1:
internal compiler error: in extract_insn, at recog.c:2304
0x12012a6c7 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../../gcc_git_trunk/gcc/rtl-error.c:108
0x12012a707 _fatal_insn_not_found(rtx_def const*, char const*, int, char
const*)
../../../gcc_git_trunk/gcc/rtl-error.c:116
0x12078f54f extract_insn(rtx_insn*)
../../../gcc_git_trunk/gcc/recog.c:2304
0x1204b9787 instantiate_virtual_regs_in_insn
../../../gcc_git_trunk/gcc/function.c:1600
0x1204b9787 instantiate_virtual_regs
../../../gcc_git_trunk/gcc/function.c:1970
0x1204b9787 execute
../../../gcc_git_trunk/gcc/function.c:2019
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


cmd:
cc1 -fpreprocessed scal-to-vec1.i -mel -quiet -dumpbase scal-to-vec1.c
-march=loongson3a -mabi=64 -mllsc -mips64r2 -mno-shared -auxbase scal-to-vec1
-O1 -w -version -fdiagnostics-color=never -fno-diagnostics-show-caret -o
scal-to-vec1.s

[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2018-03-14 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #10 from Paul Hua  ---
Any updates ?

Still fails on mips64el-linux-gnu target.

[Bug tree-optimization/82965] [8 regression] gcc.dg/vect/pr79347.c starts failing after r254379

2018-03-09 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82965

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #12 from Paul Hua  ---

On mips64el target there are same fail for now (r258364).

FAIL: gcc.dg/vect/pr79347.c  -mmsa  scan-tree-dump-not vect "Invalid sum of "
FAIL: gcc.dg/vect/pr79347.c -flto -ffat-lto-objects -mmsa  scan-tree-dump-not
vect "Invalid sum of "

After bisected, it's started with r249872.

cross-compile config with:

../configure MISSING=texinfo MAKEINFO=missing --with-mpc=/opt/cfarm/mpc-latest/
--target=mips64el-linux-gnu --enable-languages=c,c++

build cmd:
build/gcc/cc1 -mel -quiet -dumpbase pr79347.c -mmsa -march=mips64r2 -mabi=64
-mllsc -mips64r2 -mno-shared -auxbase-strip pr79347.s -O2 -version
-fdiagnostics-color=never -fno-diagnostics-show-caret -ftree-vectorize
-fvect-cost-model=unlimited -fno-common -fdump-tree-vect-details
-fdump-tree-vect-all -o pr79347.s -fpreprocessed pr79347.i

cat pr79347.i:

...

short *a;
int c;
void n(void)
{
  for (int i = 0; i<c;i++)
a[i]++;
}

[Bug regression/84623] [8 Regression] "-fcompare-debug failure (length)" testing pr46066.c start with r257826 on mips

2018-03-01 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84623

Paul Hua  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Paul Hua  ---
(In reply to Jakub Jelinek from comment #1)
> Hasn't r257993 fixed this already?

Yes, fixed.

[Bug regression/84623] New: [8 Regression] "-fcompare-debug failure (length)" testing pr46066.c start with r257826 on mips

2018-02-28 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84623

Bug ID: 84623
   Summary: [8 Regression]  "-fcompare-debug failure (length)"
testing pr46066.c start with r257826 on mips
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: regression
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

paulhua@erpro8-fsf2:~/GCC/build/gcc-r257826_obj$ ./gcc/xgcc -B./gcc
/home/paulhua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/autopar/pr46066.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -fcompare-debug -O
-ftree-parallelize-loops=4 -S -o pr46066.s 
xgcc: error:
/home/paulhua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/autopar/pr46066.c:
-fcompare-debug failure (length)

Start with r257826.

Can not reproduce with cross compiler.

On gcc23 gcc config with:

../configure --prefix=/opt/gcc-8 MISSING=texinfo MAKEINFO=missing
--target=mips64el-linux-gnu --enable-languages=c,c++

[Bug lto/84241] [8 regression] test case g++.dg/torture/pr67600.C fails starting with r257412

2018-02-06 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84241

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #3 from Paul Hua  ---
Confirmed on mips64el as well.

[Bug target/83496] MIPS BE: wrong code generates under "-Os -mbranch-cost=1"

2018-01-22 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83496

--- Comment #11 from Paul Hua  ---

> 
> Actually, I think that assembly looks unaffected by the issue.
> 
Right.


> I have some doubts about the commits mentioned in this thread as well.
> r240965 looks like it simply changes the code generator in a way that makes
> the bug appear (without being the root cause of it) by affecting how and
> where branches are generated.

Yes, r240965 just to avoid usage of branch likely insns, not the root cause of
this bug.

so, I bisecting with -mno-branch-likely. (-fpreprocessed test.i -mel -quiet
-dumpbase test.c -mbranch-cost=1 -mips32r2 -mabi=32 -mllsc -mno-shared -auxbase
test -mno-branch-likely -Os -version -o test.s)

Started with r235905.

Author: segher 
Date:   Wed May 4 20:57:08 2016 +

shrink-wrap: Remove complicated simple_return manipulations

Now that cfgcleanup knows how to optimize with return statements, the
epilogue insertion code doesn't have to deal with it itself anymore.


* function.c (emit_use_return_register_into_block): Delete.
(gen_return_pattern): Delete.
(emit_return_into_block): Delete.
(active_insn_between): Delete.
(convert_jumps_to_returns): Delete.
(emit_return_for_exit): Delete.
(thread_prologue_and_epilogue_insns): Delete all code dealing with
simple_return for shrink-wrapped blocks.
* shrink-wrap.c (try_shrink_wrapping): Insert simple_return at the
end of blocks that need one.
(get_unconverted_simple_return): Delete.
(convert_to_simple_return): Delete.
* shrink-wrap.c (get_unconverted_simple_return): Delete declaration.
(convert_to_simple_return): Ditto.

[Bug target/83496] MIPS BE: wrong code generates under "-Os -mbranch-cost=1"

2018-01-19 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83496

--- Comment #8 from Paul Hua  ---

On GCC 8.x, the r248351 fixed this.

commit fd891ec7f659e8785c3ed5757f6e60c95117b837
Author: segher 
Date:   Mon May 22 21:20:51 2017 +

cfgcleanup: Ignore clobbers in bb_is_just_return

The function bb_is_just_return finds if the BB it is asked about does
just a return and nothing else.  It currently does not allow clobbers
in the block either, which we of course can allow just fine.

This patch changes that.


* cfgcleanup.c (bb_is_just_return): Allow CLOBBERs.

gcc/testsuite/



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248351
138bc75d-0d04-0410-961f-82ee72b054a4


Paul Hua

[Bug target/83496] MIPS BE: wrong code generates under "-Os -mbranch-cost=1"

2018-01-19 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83496

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #7 from Paul Hua  ---
git bisect between r235092 and r246594 show :

It's a regression start by r240965.

 commit e55aa189d4c22c3e7992ebfbb7a90514647e219a
Author: rts <rts@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Tue Oct 11 07:58:54 2016 +

[MIPS] Disable -mbranch-likely for -Os when targetting generic arch

gcc/
* config/mips/mips-cpus.def: Replace PTF_AVOID_BRANCHLIKELY with
PTF_AVOID_BRANCHLIKELY_ALWAYS for generic architecture and with
PTF_AVOID_BRANCHLIKELY_SPEED for others.
(mips2, mips3, mips4): Add PTF_AVOID_BRANCHLIKELY_SIZE to tune flags.
* config/mips/mips.c (mips_option_override): Enable the branch likely
depending on the tune flags and optimization level.
* config/mips/mips.h (PTF_AVOID_BRANCHLIKELY): Remove.
(PTF_AVOID_BRANCHLIKELY_SPEED): Define.
(PTF_AVOID_BRANCHLIKELY_SIZE): Likewise.
(PTF_AVOID_BRANCHLIKELY_ALWAYS): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240965
138bc75d-0d04-0410-961f-82ee72b054a4

But the trunk GCC 8.X version is right. continue bisect which version fix this.

Paul Hua.

[Bug target/81874] internal compiler error: in do_SUBST, at combine.c:725

2017-08-31 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81874

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #3 from Paul Hua  ---
It hides or fixed whit r251397 on trunk.

[Bug bootstrap/81216] [8 Regression] bootstrap failed on i386 and powerpc64le

2017-06-26 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81216

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #6 from Paul Hua  ---
saw this on mips64el-linux-gnu target.

[Bug other/81041] [8 regression] test case gcc.dg/pr78582.c fails with ICE starting with r249058

2017-06-10 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81041

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #1 from Paul Hua  ---
saw this ICE on mips64el target as well.

[Bug tree-optimization/80948] [8 regression] test case gcc.dg/torture/pr68017.c fails with ICE starting with r248771

2017-06-01 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80948

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #1 from Paul Hua  ---
It's also fails on mips64el-unknown-linux-gnu.

spawn -ignore SIGHUP /home/xuchenghua/GCC/test/gcc-r248792_obj/gcc/xgcc
-B/home/xuchenghua/GCC/test/gcc-r248792_obj/gcc/
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/torture/pr68017.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -O3 -g -g -S -o
pr68017.s^M
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/torture/pr68017.c: In
function 'fn2':^M
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/torture/pr68017.c:13:1:
error: definition in block 3 follows the use^M
for SSA_NAME: _16 in statement:^M
_5 = _16 * 2;^M
during GIMPLE pass: tailc^M
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/torture/pr68017.c:13:1:
internal compiler error: verify_ssa failed^M
0x120b153b7 verify_ssa(bool, bool)^M
../../../gcc_git_trunk/gcc/tree-ssa.c:1183^M
0x1207546bf execute_function_todo^M
../../../gcc_git_trunk/gcc/passes.c:1995^M
0x120755bd7 execute_todo^M
../../../gcc_git_trunk/gcc/passes.c:2042^M
Please submit a full bug report,^M
with preprocessed source if appropriate.^M
Please include the complete backtrace with any bug report.^M
See <https://gcc.gnu.org/bugs/> for instructions.^M
compiler exited with status 1
output is: 
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/torture/pr68017.c: In
function 'fn2':^M
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/torture/pr68017.c:13:1:
error: definition in block 3 follows the use^M
for SSA_NAME: _16 in statement:^M
_5 = _16 * 2;^M
during GIMPLE pass: tailc^M
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.dg/torture/pr68017.c:13:1:
internal compiler error: verify_ssa failed^M
0x120b153b7 verify_ssa(bool, bool)^M
../../../gcc_git_trunk/gcc/tree-ssa.c:1183^M
0x1207546bf execute_function_todo^M
../../../gcc_git_trunk/gcc/passes.c:1995^M
0x120755bd7 execute_todo^M
../../../gcc_git_trunk/gcc/passes.c:2042^M
Please submit a full bug report,^M
with preprocessed source if appropriate.^M
Please include the complete backtrace with any bug report.^M
See <https://gcc.gnu.org/bugs/> for instructions.^M

FAIL: gcc.dg/torture/pr68017.c   -O3 -g  (internal compiler error)
FAIL: gcc.dg/torture/pr68017.c   -O3 -g  (test for excess errors)

[Bug target/80306] ICE in cfgexpand.c during cross-compilation for mips target

2017-05-25 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80306

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #2 from Paul Hua  ---
The bug has been fixed on trunk between r245900 and r246851.

[Bug bootstrap/80509] ICE in cc1 during selftests

2017-04-25 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80509

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #7 from Paul Hua  ---
(In reply to Richard Biener from comment #4)
> I can't reproduce on x86_64-linux btw.  Can you be more specific as to what
> selftest fails?  Please use gdb to get at least a backtrace from the failing
> cc1 command.

FYI.

cc1 comand:
/home/xuchenghua/GCC/x86/gcc-r247089_obj/./gcc/cc1 -E -quiet -nostdinc -v
-iprefix
/home/xuchenghua/GCC/x86/gcc-r247089_obj/gcc/../lib/gcc/x86_64-linux-gnu/8.0.0/
-isy
stem /home/xuchenghua/GCC/x86/gcc-r247089_obj/./gcc/include -isystem
/home/xuchenghua/GCC/x86/gcc-r247089_obj/./gcc/include-fixed /dev/null
-mtune=generic -march=x86-64 -fself-test=../../../gcc_git
_trunk/gcc/testsuite/selftests -fpch-preprocess -o null.i

configure with:
xuchenghua@C65-x86:50: gcc $ /home/xuchenghua/GCC/x86/gcc-r247089_obj/gcc/xgcc 
-v
Using built-in specs.
COLLECT_GCC=/home/xuchenghua/GCC/x86/gcc-r247089_obj/gcc/xgcc
Target: x86_64-linux-gnu
Configured with: ../../gcc_git_trunk/configure
--prefix=/home/xuchenghua/toolchain/gcc-r247089 --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--enable-multilib--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --enable-languages=c,c++,fortran --enable-plugin
--enable-initfini-array --disable-libgcj --enable-gnu-indirect-function
--with-long-double-128 --build=x86_64-linux-gnu --with-pkgversion='gcc trunk
r247089' --with-gmp=/opt/gcc-infrastructure --with-mpfr=/opt/gcc-infrastructure
--with-mpc=/opt/gcc-infrastructure
Thread model: posix
gcc version 8.0.0 20170424 (experimental) (gcc trunk r247089)

gdb backtrace:

xuchenghua@C65-x86:50: gcc $ gdb
/home/xuchenghua/GCC/x86/gcc-r247089_obj/./gcc/cc1
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/xuchenghua/GCC/x86/gcc-r247089_obj/gcc/cc1...done.
warning: File "/home/xuchenghua/GCC/x86/gcc-r247089_obj/gcc/.gdbinit"
auto-loading has been declined by your `auto-load safe-path' set to
"/usr/share/gdb/auto-load:/usr/lib/debug:/usr/bin/mono-gdb.py".
To enable execution of this file add
add-auto-load-safe-path
/home/xuchenghua/GCC/x86/gcc-r247089_obj/gcc/.gdbinit
line to your configuration file "/home/xuchenghua/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/xuchenghua/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
info "(gdb)Auto-loading safe path"
(gdb) r -E -quiet -nostdinc -v -iprefix
/home/xuchenghua/GCC/x86/gcc-r247089_obj/gcc/../lib/gcc/x86_64-linux-gnu/8.0.0/
-isystem /home/xuchenghua/GCC/x86/gcc-r247089_obj/./gcc/include -isystem
/home/xuchenghua/GCC/x86/gcc-r247089_obj/./gcc/include-fixed /dev/null
-mtune=generic -march=x86-64
-fself-test=../../../gcc_git_trunk/gcc/testsuite/selftests -fpch-preprocess -o
null.i
Starting program: /home/xuchenghua/GCC/x86/gcc-r247089_obj/gcc/cc1 -E -quiet
-nostdinc -v -iprefix
/home/xuchenghua/GCC/x86/gcc-r247089_obj/gcc/../lib/gcc/x86_64-linux-gnu/8.0.0/
-isystem /home/xuchenghua/GCC/x86/gcc-r247089_obj/./gcc/include -isystem
/home/xuchenghua/GCC/x86/gcc-r247089_obj/./gcc/include-fixed /dev/null
-mtune=generic -march=x86-64
-fself-test=../../../gcc_git_trunk/gcc/testsuite/selftests -fpch-preprocess -o
null.i

Program received signal SIGSEGV, Segmentation fault.
0x00c8f426 in
simple_hashmap_traits<default_hash_traits,
opt_pass*>::is_empty<hash_map<nofree_string_hash, opt_pass*,
simple_hashmap_traits<default_hash_traits, opt_pass*>
>::hash_entry> (entry=...) at ../../../gcc_git_trunk/gcc/hash-map-traits.h:73
73return H::is_empty (entry.m_key);
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.132.el6.x86_64
libgcc-4.4.7-4.el6.x86_64 libstdc++-4.4.7-4.el6.x86_64
(gdb) bt
#0  0x00c8f426 in
simple_hashmap_traits<default_hash_traits,
opt_pass*>::is_empty<hash_map<nofree_string_hash, opt_pass*,
simple_hashmap_traits<default_hash_traits, opt_pass*>
>::hash_entry> (entry=...) at ../../

[Bug target/78660] [7 Regression] 7.0 bootstrap fail on mips64el-unknow-linux: configure-stage2-target-libgcc' failed

2016-12-20 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78660

--- Comment #5 from Paul Hua  ---
(In reply to Paul Hua from comment #4)

> 
> Maybe the r242326 cause the bug, the r242324 build success.
>
The r242326 and r242324 has another bug that r242522 fixed. If use r242326 to
reproduce this bug, you should patched the r242522.

[Bug target/78660] [7 Regression] 7.0 bootstrap fail on mips64el-unknow-linux: configure-stage2-target-libgcc' failed

2016-12-20 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78660

--- Comment #4 from Paul Hua  ---
The r243817 still build failure.


configure:3460: /home/xuchenghua/GCC/test/gcc-r243817_obj/./gcc/xgcc
-B/home/xuchenghua/GCC/test/gcc-r243817_obj/./gcc/
-B/home/xuchenghua/toolchain/gcc-trunk-r243817/mips64el-unknown-linux/bin/
-B/home/xuchenghua/toolchain/gcc-trunk-r243817/mips64el-unknown-linux/lib/
-isystem
/home/xuchenghua/toolchain/gcc-trunk-r243817/mips64el-unknown-linux/include
-isystem
/home/xuchenghua/toolchain/gcc-trunk-r243817/mips64el-unknown-linux/sys-include
   -o conftest -g -O2 -minterlink-mips16   conftest.c  >&5
conftest.c: In function 'main':
conftest.c:11:1: error: unrecognizable insn:
 main ()
 ^~~~
(insn 2 0 0 (set (reg:TI 64 lo) 
(const_int 0 [0])) "conftest.c":12 -1
 (nil))
conftest.c:11:1: internal compiler error: in internal_dfa_insn_code, at
config/mips/mips.md:764
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
configure:3463: $? = 1 
configure:3651: checking for suffix of object files
configure:3673: /home/xuchenghua/GCC/test/gcc-r243817_obj/./gcc/xgcc
-B/home/xuchenghua/GCC/test/gcc-r243817_obj/./gcc/
-B/home/xuchenghua/toolchain/gcc-trunk-r243817/mips64el-unknown-linux/bin/
-B/home/xuchenghua/toolchain/gcc-trunk-r243817/mips64el-unknown-linux/lib/
-isystem
/home/xuchenghua/toolchain/gcc-trunk-r243817/mips64el-unknown-linux/include
-isystem
/home/xuchenghua/toolchain/gcc-trunk-r243817/mips64el-unknown-linux/sys-include
   -c -g -O2 -minterlink-mips16  conftest.c >&5
conftest.c: In function 'main':
conftest.c:11:1: error: unrecognizable insn:
 main ()
 ^~~~
(insn 2 0 0 (set (reg:TI 64 lo)
(const_int 0 [0])) "conftest.c":12 -1
 (nil))
conftest.c:11:1: internal compiler error: in internal_dfa_insn_code, at
config/mips/mips.md:764
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
configure:3677: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/;
| /* end confdefs.h.  */
|
| int  
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3691: error: in
`/home/xuchenghua/GCC/test/gcc-r243817_obj/mips64el-unknown-linux/libgcc':
configure:3694: error: cannot compute suffix of object files: cannot compile
-

Maybe the r242326 cause the bug, the r242324 build success.

[Bug target/78660] [7 Regression] 7.0 bootstrap fail on mips64el-unknow-linux: configure-stage2-target-libgcc' failed

2016-12-11 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78660

--- Comment #1 from Paul Hua  ---
The latest version r243504 still build fail.
The version r241773 can build successfully.

[Bug bootstrap/78660] New: 7.0 bootstrap fail on mips64el-unknow-linux: configure-stage2-target-libgcc' failed

2016-12-03 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78660

Bug ID: 78660
   Summary: 7.0 bootstrap fail on mips64el-unknow-linux:
configure-stage2-target-libgcc' failed
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

checking for mips64el-unknown-linux-gcc...
/home/xuchenghua/GCC/test/gcc-r243216_obj/./gcc/xgcc
-B/home/xuchenghua/GCC/test/gcc-r243216_obj/./gcc/
-B/home/xuchenghua/toolchain/gcc-trunk-r243216/mips64el-unknown-linux/bin/
-B/home/xuchenghua/toolchain/gcc-trunk-r243216/mips64el-unknown-linux/lib/
-isystem
/home/xuchenghua/toolchain/gcc-trunk-r243216/mips64el-unknown-linux/include
-isystem
/home/xuchenghua/toolchain/gcc-trunk-r243216/mips64el-unknown-linux/sys-include
checking for suffix of object files... configure: error: in
`/home/xuchenghua/GCC/test/gcc-r243216_obj/mips64el-unknown-linux/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
Makefile:16964: recipe for target 'configure-stage2-target-libgcc' failed
make[2]: *** [configure-stage2-target-libgcc] Error 1
make[2]: Leaving directory '/home/xuchenghua/GCC/test/gcc-r243216_obj'
Makefile:21741: recipe for target 'stage2-bubble' failed
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory '/home/xuchenghua/GCC/test/gcc-r243216_obj'
Makefile:930: recipe for target 'all' failed
make: *** [all] Error 2


config with:
../../gcc_git_trunk/configure
--prefix=/home/xuchenghua/toolchain/gcc-trunk-r243216 --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--enable-multilib--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --enable-languages=c,c++,fortran --enable-plugin
--enable-initfini-array --disable-libgcj --with-arch=loongson3a --with-abi=64
--with-multilib-list=32,n32,64 --enable-gnu-indirect-function
--with-long-double-128 --build=mips64el-unknown-linux
--target=mips64el-unknown-linux --with-pkgversion="gcc trunk r243216 mips64el
o32 n32 n64" --disable-werror

The stage2 cc1 error:
 /home/xuchenghua/GCC/test/gcc-r243216_obj/gcc/cc1 -fpreprocessed conftest.i
-mel -quiet -dumpbase conftest.c -minterlink-mips16 -march=loongson3a -mabi=64
-mllsc -mips64r2 -mno-shared -auxbase conftest -g -O2 -version -o conftest.s
GNU C11 (gcc trunk r243216 mips64el o32 n32 n64) version 7.0.0 20161203
(experimental) (mips64el-unknown-linux)
compiled by GNU C version 7.0.0 20161203 (experimental), GMP version
6.0.0, MPFR version 3.1.2, MPC version 1.0.2, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C11 (gcc trunk r243216 mips64el o32 n32 n64) version 7.0.0 20161203
(experimental) (mips64el-unknown-linux)
compiled by GNU C version 7.0.0 20161203 (experimental), GMP version
6.0.0, MPFR version 3.1.2, MPC version 1.0.2, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 0eecc65de03f9d4164676d34867098d5
conftest.c:11:2: error: invalid storage class for function ‘main’
  main ()
  ^~~~

But stage1 cc1 ok for build this:

 /home/xuchenghua/GCC/test/gcc-r243216_obj/prev-gcc/cc1 -fpreprocessed
conftest.i -mel -quiet -dumpbase conftest.c -minterlink-mips16
-march=loongson3a -mabi=64 -mllsc -mips64r2 -mno-shared -auxbase conftest -g
-O2 -version -o conftest.s
GNU C11 (gcc trunk r243216 mips64el o32 n32 n64) version 7.0.0 20161203
(experimental) (mips64el-unknown-linux)
compiled by GNU C version 4.9.3 20150626 (Red Hat 4.9.3-5), GMP version
6.0.0, MPFR version 3.1.2, MPC version 1.0.2, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C11 (gcc trunk r243216 mips64el o32 n32 n64) version 7.0.0 20161203
(experimental) (mips64el-unknown-linux)
compiled by GNU C version 4.9.3 20150626 (Red Hat 4.9.3-5), GMP version
6.0.0, MPFR version 3.1.2, MPC version 1.0.2, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

The *.i:
$ cat conftest.i 

# 1 "conftest.c"
# 1 "/home/xuchenghua/GCC/test/gcc-r243216_obj/mips64el-unknown-linux/libgcc//"
# 1 ""
# 1 ""
# 31 ""
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 32 "" 2
# 1 "conftest.c"
# 10 "conftest.c"
 int
 main ()
 {

   ;
   return 0;
 }

[Bug target/65682] bootstrap failure of gcc-4.9.2 on mips64el target in libgcc "_mulvdi3.o"

2016-09-22 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65682

Paul Hua  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Paul Hua  ---
GCC 5.4 or later has been builded successfully.
Closed this bug report.

[Bug target/69129] [6 Regression] ICE in get_attr_got, at config/mips/mips.md:694 on mips-linux-gnu

2016-01-19 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69129

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #4 from Paul Hua  ---
The bug same as pr69012 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69012

[Bug bootstrap/69134] building a mips-cross compiler with in-tree mpfr-2.4.2 fails

2016-01-05 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69134

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #1 from Paul Hua  ---
Try this patch for mpfr-2.4.2.

--- mpfr-longlong.h.bak 2016-01-06 11:13:03.474846621 +0800
+++ mpfr-longlong.h 2016-01-06 11:44:38.839800251 +0800
@@ -1011,7 +1011,7 @@
 #endif /* __m88000__ */

 #if defined (__mips) && W_TYPE_SIZE == 32
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+#if __GNUC__ < 4
 #define umul_ppmm(w1, w0, u, v) \
   __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
 #else
@@ -1024,7 +1024,7 @@
 #endif /* __mips */

 #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+#if __GNUC__ < 4
 #define umul_ppmm(w1, w0, u, v) \
   __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
 #else

[Bug target/69012] gcc-6.0.0 internal compiler error building libgfortran for mips64el target

2015-12-24 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69012

--- Comment #10 from Paul Hua  ---
(In reply to Bernd Edlinger from comment #9)
> (In reply to Paul Hua from comment #8)
> > (In reply to Bernd Edlinger from comment #6)
> > > (In reply to Paul Hua from comment #5)
> > > > Created attachment 37115 [details]
> > > > building command
> > > 
> > > I'm unable to reproduce.
> > > What is your cross-compiler command line?
> > 
> 
> 
> and how exactly did you configure your cross compiler?

I'm compared the diff between your configure and mine, find something that my
configure specify the --with-build-time-tools=xxx. If don't specify the
--with-build-time-tools=xxx the gcc(both r225249 and r225260) can be build
successfully. This is the reason why you can't reproduce.

But, when specify the --with-build-time-tools=xxx the gcc r225249 can be build
successfully. The gcc r225260 failed, the error is same as above. 

The --with-build-time-tools=xxx is the binutils installed dir.

binutils cross-compiler configure with:

../../binutils-gdb_git_trunk/configure
--prefix=/home/xuchenghua/toolchain/cross-compiler/gcc-6.0.0
--build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=mipsel-redhat-linux-gnu

gcc cross-compiler configure with:

../../gcc_git_trunk/configure --prefix=/home/xuchenghua/gcc-trunk
--target=mipsel-redhat-linux --with-arch=mips64r2 --with-abi=32
--enable-threads=posix --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --disable-dssi --disable-multilib
--enable-languages=c --enable-shared
--with-build-time-tools=/home/xuchenghua/toolchain/cross-compiler/gcc-6.0.0/mipsel-redhat-linux-gnu/bin/

I'm sorry for wasted your time.

thanks.

[Bug target/69012] gcc-6.0.0 internal compiler error building libgfortran for mips64el target

2015-12-23 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69012

--- Comment #4 from Paul Hua  ---
Created attachment 37114
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37114=edit
preprocessed source for maxval_r4.c

The compile command line :

cc1 -fpreprocessed maxval_r4.i -mel -quiet -dumpbase maxval_r4.c -mabi=32
-minterlink-mips16 -march=mips64r2 -mllsc -mips64r2 -mno-shared -auxbase-strip
maxval_r4.o -g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wextra -Wwrite-strings
-Werror=implicit-function-declaration -Werror=vla -Wunknown-pragmas -std=gnu11
-std=gnu11 -version -fcx-fortran-rules -ffunction-sections -fdata-sections -o
maxval_r4.s

Thanks.

[Bug target/69012] gcc-6.0.0 internal compiler error building libgfortran for mips64el target

2015-12-23 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69012

--- Comment #5 from Paul Hua  ---
Created attachment 37115
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37115=edit
building command

[Bug target/69012] gcc-6.0.0 internal compiler error building libgfortran for mips64el target

2015-12-23 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69012

--- Comment #8 from Paul Hua  ---

(In reply to Bernd Edlinger from comment #6)
> (In reply to Paul Hua from comment #5)
> > Created attachment 37115 [details]
> > building command
> 
> I'm unable to reproduce.
> What is your cross-compiler command line?

The command line have been submitted on comment #4:

$where_build_obj/gcc/cc1 -fpreprocessed maxval_r4.i -mel -quiet -dumpbase
maxval_r4.c -mabi=32 -minterlink-mips16 -march=mips64r2 -mllsc -mips64r2
-mno-shared -auxbase-strip maxval_r4.o -g -O2 -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings
-Werror=implicit-function-declaration -Werror=vla -Wunknown-pragmas -std=gnu11
-std=gnu11 -version -fcx-fortran-rules -ffunction-sections -fdata-sections -o
maxval_r4.s

[Bug target/69012] gcc-6.0.0 internal compiler error building libgfortran for mips64el target

2015-12-23 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69012

Paul Hua  changed:

   What|Removed |Added

 CC||bernd.edlinger at hotmail dot 
de

--- Comment #2 from Paul Hua  ---
The "internal compiler error" appeared after trunk revision 225260, and the
revision 225249 can be successfully compiled.

The r225260 show:

commit 32e90dc6a0cda452b426b370326e315ac6f10f02
Author: edlinger 
Date:   Wed Jul 1 16:10:30 2015 +

gcc/ChangeLog:
2015-07-01  Bernd Edlinger  

PR rtl-optimization/61047
* rtlanal.c (get_initial_register_offset): New function.
(rtx_addr_can_trap_p_1): Check offsets of stack references.

testsuite/ChangeLog:
2015-07-01  Bernd Edlinger  

PR rtl-optimization/61047
* gcc.c-torture/execute/20150611-1.c: New testcase.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225260
138bc75d-0d04-0410-961f-82ee72b054a4

any one can fixing this ?

[Bug target/69012] gcc-6.0.0 internal compiler error building libgfortran for mips64el target

2015-12-22 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69012

--- Comment #1 from Paul Hua  ---
The cross compile also crashed ...

/home/xuchenghua/GCC/mips/gcc-trunk-231896-o32_obj/./gcc/xgcc
-B/home/xuchenghua/GCC/mips/gcc-trunk-231896-o32_obj/./gcc/
-B/home/xuchenghua/toolchain/cross-tool
s/gcc-o32/usr/mipsel-redhat-linux/bin/
-B/home/xuchenghua/toolchain/cross-tools/gcc-o32/usr/mipsel-redhat-linux/lib/
-isystem /home/xuchenghua/toolchain/cross-tools/gcc-o32/usr/mipsel-redhat-linux
/include -isystem
/home/xuchenghua/toolchain/cross-tools/gcc-o32/usr/mipsel-redhat-linux/sys-include
-DHAVE_CONFIG_H -I. -I../../../../gcc_git_trunk/libgfortran
-iquote../../../../gcc_git_trunk/li
bgfortran/io -I../../../../gcc_git_trunk/libgfortran/../gcc
-I../../../../gcc_git_trunk/libgfortran/../gcc/config -I../.././gcc
-I../../../../gcc_git_trunk/libgfortran/../libgcc -I../libgcc -I../.
./../../gcc_git_trunk/libgfortran/../libbacktrace -I../libbacktrace
-I../libbacktrace -std=gnu11 -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wextra -Wwrite-strings -Werr
or=implicit-function-declaration -Werror=vla -fcx-fortran-rules
-ffunction-sections -fdata-sections -std=gnu11 -g -O2 -minterlink-mips16
-Wunknown-pragmas -MT maxval_r4.lo -MD -MP -MF .deps/maxval
_r4.Tpo -c ../../../../gcc_git_trunk/libgfortran/generated/maxval_r4.c -o
maxval_r4.o
../../../../gcc_git_trunk/libgfortran/generated/maxval_r4.c: In function
'maxval_r4':
../../../../gcc_git_trunk/libgfortran/generated/maxval_r4.c:200:1: error:
unrecognizable insn:
 }
 ^

(insn 688 687 690 2 (parallel [
(set (mem/c:SI (plus:SI (reg/f:SI 29 $sp)
(const_int 16 [0x10])) [11  S4 A32])
(unspec:SI [
(const_int 16 [0x10])
(reg:SI 28 $28)
] UNSPEC_POTENTIAL_CPRESTORE))
(clobber (scratch:SI))
]) ../../../../gcc_git_trunk/libgfortran/generated/maxval_r4.c:42 -1
 (expr_list:REG_DEAD (reg:SI 28 $28)
(nil)))
../../../../gcc_git_trunk/libgfortran/generated/maxval_r4.c:200:1: internal
compiler error: in get_attr_got, at config/mips/mips.md:694

Host:x86_64-redhat-linux
Target:mipsel-redhat-linux

The cross compile configured with:
  $ ../../gcc_git_trunk/configure
--prefix=/home/xuchenghua/toolchain/cross-tools/gcc-o32/usr
--with-sysroot=/home/xuchenghua/toolchain/cross-tools/gcc-o32/usr/mipsel-redhat-linux/sysroot
--target=mipsel-redhat-linux --with-arch=mips64r2 --with-abi=32
--with-gmp=/home/xuchenghua/toolchain/cross-tools/gcc-o32/usr/
--with-mpfr=/home/xuchenghua/toolchain/cross-tools/gcc-o32/usr/
--with-mpc=/home/xuchenghua/toolchain/cross-tools/gcc-o32/usr/
--enable-threads=posix --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --disable-dssi --disable-multilib
--enable-languages=c,c++,objc,obj-c++,fortran,go,lto --enable-shared
--with-build-time-tools=/home/xuchenghua/toolchain/cross-tools/gcc-o32/usr/mipsel-redhat-linux/bin
--with-pkgversion=gcc 20151222 commit: gcc-trunk-231896 

This may be help to reproduced。

[Bug target/69012] New: gcc-6.0.0 internal compiler error building libgfortran for mips64el target

2015-12-22 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69012

Bug ID: 69012
   Summary: gcc-6.0.0 internal compiler error building libgfortran
for mips64el target
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: critical
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

I compiled the gcc version trunk@231140  under platform mips64el. The flowning
error occurred.

../../../../gcc-653b0b0/libgfortran/generated/maxval_r4.c: In function
‘maxval_r4’:
../../../../gcc-653b0b0/libgfortran/generated/maxval_r4.c:200:1: error:
unrecognizable insn:
 }
 ^

(insn 706 705 708 2 (parallel [
(set (mem/c:SI (plus:SI (reg/f:SI 29 $sp)
(const_int 16 [0x10])) [11  S4 A32])
(unspec:SI [
(const_int 16 [0x10])
(reg:SI 28 $28)
] UNSPEC_POTENTIAL_CPRESTORE))
(clobber (scratch:SI))   
]) ../../../../gcc-653b0b0/libgfortran/generated/maxval_r4.c:42 -1
 (expr_list:REG_DEAD (reg:SI 28 $28)
(nil)))
../../../../gcc-653b0b0/libgfortran/generated/maxval_r4.c:200:1: internal
compiler error: in get_attr_got, at config/mips/mips.md:694
0x1205cf5bf _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc-653b0b0/gcc/rtl-error.c:108
0x1205cf61f _fatal_insn_not_found(rtx_def const*, char const*, int, char
const*)
../../gcc-653b0b0/gcc/rtl-error.c:116
0x1209f062b get_attr_got(rtx_insn*)
../../gcc-653b0b0/gcc/config/mips/mips.md:694
0x120925bbf mips_insn_has_flexible_gp_ref_p
../../gcc-653b0b0/gcc/config/mips/mips.c:9927
0x120913813 mips_find_gp_ref
../../gcc-653b0b0/gcc/config/mips/mips.c:9858
0x120923c5f mips_global_pointer
../../gcc-653b0b0/gcc/config/mips/mips.c:9979
0x120923c5f mips_compute_frame_info  
../../gcc-653b0b0/gcc/config/mips/mips.c:10350
0x1209322c7 mips_initial_elimination_offset(int, int)
../../gcc-653b0b0/gcc/config/mips/mips.c:10591
0x1205d156b get_initial_register_offset
../../gcc-653b0b0/gcc/rtlanal.c:383
0x1205d1a2b rtx_addr_can_trap_p_1
../../gcc-653b0b0/gcc/rtlanal.c:618
0x1205d18bb rtx_addr_can_trap_p_1
../../gcc-653b0b0/gcc/rtlanal.c:679
0x1205d72cf may_trap_p_1(rtx_def const*, unsigned int)
../../gcc-653b0b0/gcc/rtlanal.c:2819
0x1202a1c47 can_move_insns_across(rtx_insn*, rtx_insn*, rtx_insn*, rtx_insn*,
basic_block_def*, bitmap_head*, bitmap_head*, rtx_insn**)
../../gcc-653b0b0/gcc/df-problems.c:4156
0x120b25bab dead_or_predicable
../../gcc-653b0b0/gcc/ifcvt.c:5099
0x120b2aca7 find_if_case_1
../../gcc-653b0b0/gcc/ifcvt.c:4791
0x120b2aca7 find_if_header
../../gcc-653b0b0/gcc/ifcvt.c:4194
0x120b2aca7 if_convert
../../gcc-653b0b0/gcc/ifcvt.c:5325
0x120b2bcbf execute
../../gcc-653b0b0/gcc/ifcvt.c:5515
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://bugs.loongnix.org/> for instructions.

The trunk@231896 occurred as same.

The cmd are :
/home/xuchenghua/GCC/gcc_git_trunk_231896_obj/./gcc/xgcc
-B/home/xuchenghua/GCC/gcc_git_trunk_231896_obj/./gcc/
-B/home/xuchenghua/toolchain/gcc-trunk-231896/mips6
4el-redhat-linux/bin/
-B/home/xuchenghua/toolchain/gcc-trunk-231896/mips64el-redhat-linux/lib/
-isystem
/home/xuchenghua/toolchain/gcc-trunk-231896/mips64el-redhat-linux/include
-isystem /home/xuc
henghua/toolchain/gcc-trunk-231896/mips64el-redhat-linux/sys-include -mabi=32
-DHAVE_CONFIG_H -I. -I../../../../gcc_git_trunk/libgfortran
-iquote../../../../gcc_git_trunk/libgfortran/io -I../../..
/../gcc_git_trunk/libgfortran/../gcc
-I../../../../gcc_git_trunk/libgfortran/../gcc/config -I../../.././gcc
-I../../../../gcc_git_trunk/libgfortran/../libgcc -I../../libgcc
-I../../../../gcc_git_t
runk/libgfortran/../libbacktrace -I../../libbacktrace -I../libbacktrace
-std=gnu11 -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wextra -Wwrite-strings -Werror=implicit-fu
nction-declaration -Werror=vla -fcx-fortran-rules -ffunction-sections
-fdata-sections -std=gnu11 -g -O2 -minterlink-mips16 -Wunknown-pragmas -MT
maxval_r4.lo -MD -MP -MF .deps/maxval_r4.Tpo -c ../
../../../gcc_git_trunk/libgfortran/generated/maxval_r4.c -o maxval_r4.o

Configured with:
  $ ../gcc_git_trunk/configure
--prefix=/home/xuchenghua/toolchain/gcc-trunk-231896 --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--enable-multilib--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,fortran,go,lto
--enable-plugin --enable-initfini-array --disable-libgcj --with-arch=mips64r2
--with-