[Bug c++/93295] ICE in alias_ctad_tweaks

2020-01-17 Thread ensadc at mailnesia dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93295

--- Comment #3 from ensadc at mailnesia dot com ---
It appears that alias_ctad_tweaks assumes the deduction of the right hand side
of the deduction guide from the alias template does not fail.

> int err = unify (ftparms, targs, ret, utype, UNIFY_ALLOW_NONE, false);
> gcc_assert (!err);

But this can fail if the RHS of the deduction guide contains `T*` or the like.

I guess this is exactly where the simplification mentioned in r278786 fails to
work.

[Bug tree-optimization/20083] Missed optimization with conditional and basically ||

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20083

--- Comment #4 from Andrew Pinski  ---
Take f4, if we compile with -O1 -fno-tree-sink, you will see the behavior we
get for f.

[Bug tree-optimization/20083] Missed optimization with conditional and basically ||

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20083

--- Comment #3 from Andrew Pinski  ---
Here is another testcase which should produce the same code:
int f3(int i, int j, int l)
{
  int t = i | j;
  _Bool t1 = l != 0;
  _Bool t2 = t ? 1 : t1;
  return t2;
}

int f4(int i, int j, int l)
{
  int t = i | j;
  _Bool t1 = l != 0;
  _Bool t2;
  if (t)
   t2 = 1;
  else
   t2 = t1;
  return t2;
}


--- CUT 
Note f1, f2, f3 and f4 all produce the same code now.
f comes close now, but still requires work:
orr w0, w0, w1
cmp w0, 0
csetw0, ne
cmp w2, 0
csinc   w0, w0, wzr, eq
it does an ifcvt on the rtl level to get the csinc.
f4 is exactly what f2 looks like at the .optimized as the input to the gimple
and reassoc can optimize this case but only if we sink l != 0 into the if
statement.

So this is another improvement needed for reassoc really.
I will look at this next week or the week after.

[Bug target/92692] [9 Regression] Saving off the callee saved register between ldxr/stxr (caused by shrink wrapping improvements)

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92692

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2020-01-18
 Ever confirmed|0   |1

--- Comment #16 from Andrew Pinski  ---
.

[Bug fortran/93234] INQUIRE on pre-assigned files of ROUND and SIGN properties fails

2020-01-17 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93234

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Jerry DeLisle :

https://gcc.gnu.org/g:e2947cfa2d1d4da13bb298b4f36cd745b007d88d

commit r10-6060-ge2947cfa2d1d4da13bb298b4f36cd745b007d88d
Author: Jerry DeLisle 
Date:   Fri Jan 17 19:36:03 2020 -0800

PR93234 INQUIRE on pre-assigned files of ROUND and SIGN properties

PR libfortran/93234
* io/unit.c (set_internal_unit): Set round and sign flags
correctly.

* gfortran.dg/inquire_pre.f90: New test.

[Bug target/46225] Wrong code generated for certain constants

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46225

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Andrew Pinski  ---
spu target has been removed so closing as won't fix.

[Bug target/54956] GCC 4.7.2: internal compiler error: in emit_move_insn, at expr.c:3435

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54956

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Andrew Pinski  ---
spu target has been removed so closing as won't fix.

[Bug target/46721] Unnecessary stack instructions are generated for SPU when returning a struct

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46721

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Andrew Pinski  ---
spu target has been removed so closing as won't fix.

[Bug target/31945] missing type vector conversions patterns on spu

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31945

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #3 from Andrew Pinski  ---
spu target has been removed so closing as won't fix.

[Bug target/36972] Redundant creation of stack frame on spu-gcc

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36972

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Andrew Pinski  ---
spu target has been removed so closing as won't fix.

[Bug target/36829] Take advantage of lower bit zeroing of load/store insns on SPU

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36829

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Andrew Pinski  ---
spu target has been removed so closing as won't fix.

[Bug target/36698] gcc.c-torture/compile/20001226-1.c exceeds SPU local store size with -O0

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36698

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #3 from Andrew Pinski  ---
spu target has been removed so closing as won't fix.

[Bug target/36525] prologue code may give invalid stack back chain

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36525

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Andrew Pinski  ---
spu target has been removed so closing as won't fix.

[Bug target/33536] extraneous escapes

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33536

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Andrew Pinski  ---
spu target has been removed so closing as won't fix.

[Bug libgcc/66939] build error gcc-5.2.0/libgcc/libgcc2.c:1955:6 internal compiler error: in real_from_string, at real.c:2078

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66939

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Andrew Pinski  ---
The version of GMP/MPFR is miscompiled.  So this is not a bug in GCC.  Closing
as invalid as there has been no comments on this working in over 3 years.

[Bug bootstrap/48548] recent svn version gcc (4.6? 4.7?) compile failed

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48548

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #7 from Andrew Pinski  ---
cloog is no longer used so closing as invalid.

[Bug target/77897] Compile error with KNL & -O3 for GTC code

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77897

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from Andrew Pinski  ---
Closing as invalid as you really need a newer binutils.

[Bug c++/78177] adding -flto flags causes linker error "undefined reference to vtable"

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78177

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Andrew Pinski  ---
No testcase in over 3 years so closing as invalid.

[Bug lto/53604] ld reports errors using lto after upgrading from gcc-4.6.2 to gcc-4.7.0

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53604

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #14 from Andrew Pinski  ---
(In reply to Martin Sebor from comment #13)
Add over 2.5 years so closing as invalid.

[Bug libgcc/80314] Undefined reference to __dso_handle & __cxa_atexit

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80314

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #9 from Andrew Pinski  ---
No comments on this for 2.5 years so closing as invalid.

[Bug driver/53883] GCC 4.7.1 doesn't build on Mac OS X 10.4.11 Tiger/PowerPC (32-bit), at least with MacPorts

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53883

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #13 from Andrew Pinski  ---
No comments in over 2 years so closing.

[Bug sanitizer/55506] gcc.dg/cleanup-{10,11,8,9}.c execution test failures with -fsanitize=address

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55506

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Andrew Pinski  ---
(In reply to Martin Liška from comment #2)
> Likewise, is the issue still present?

no comments in 2.5 years so closing as invalid.

[Bug pch/49579] Document how to use PCH with Automake

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49579

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from Andrew Pinski  ---
Wouldn't this be better as a bug on the automake side rather than GCC?
I think so, so closing as invalid.

[Bug target/55089] ICE in varasm.c during bootstrap-lean on x86_64-pc-solaris2.10

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55089

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from Andrew Pinski  ---
No response to my questions in over 7 years so closing as invalid.

[Bug lto/56877] When using LTO and linking statically, coredumps contain unusable stack trace

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56877

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #4 from Andrew Pinski  ---
Works for me and others for over 6 years.

[Bug libstdc++/59421] stof(), stod() wrong result

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59421

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from Andrew Pinski  ---
No testcase for over 6 years so closing as invalid.

[Bug go/67180] Gccgo does not support MIPS

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67180

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #6 from Andrew Pinski  ---
Fixed for a while now.  I have been compiling gccgo since GCC 7.x.

[Bug target/91320] [9/10 Regression] x86-64 code generation / register allocation regressed.

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91320

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2020-01-18
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Do you have the preprocessed source?

[Bug target/93242] [MIPS] patchable-function-entry broken

2020-01-17 Thread renat at idrisov dot info
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93242

--- Comment #6 from Renat Idrisov  ---
Thanks a lot!

[Bug target/93242] [MIPS] patchable-function-entry broken

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93242

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||patch
URL||https://gcc.gnu.org/ml/gcc-
   ||patches/2020-01/msg01080.ht
   ||ml

--- Comment #5 from Andrew Pinski  ---
Patch posted:
https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01080.html

[Bug target/93242] [MIPS] patchable-function-entry broken

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93242

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org

--- Comment #4 from Andrew Pinski  ---
Mine.

[Bug target/93242] [MIPS] patchable-function-entry broken

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93242

--- Comment #3 from Andrew Pinski  ---
The problem is here:
  unsigned i;
  for (i = 0; i < patch_area_size; ++i)
fprintf (file, "\t%s\n", nop_templ);

inside default_print_patchable_function_entry.

[Bug target/93242] [MIPS] patchable-function-entry broken

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93242

--- Comment #2 from Andrew Pinski  ---
   '('  Start a nested ".set noreorder" block.
   ')'  End a nested ".set noreorder" block.

For some reason it is not working 

[Bug target/93242] [MIPS] patchable-function-entry broken

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93242

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||wrong-code
 Target|mips|mips*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-01-18
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Confirmed.

[Bug target/93221] [10 Regression] ICE maximum number of generated reload insns per insn achieved (90) on aarch64

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93221

Andrew Pinski  changed:

   What|Removed |Added

 CC||doko at ubuntu dot com

--- Comment #4 from Andrew Pinski  ---
*** Bug 93303 has been marked as a duplicate of this bug. ***

[Bug rtl-optimization/93303] [10 Regression] ICE in lra_constraints.c4948 on aarch64-linux-gnu

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93303

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Andrew Pinski  ---
(insn 10 9 11 (set (reg:V4SI 96)
(reg:V4SI 32 v0)) "":107:25 -1
 (nil))

(insn 11 10 12 (set (reg:V4SI 97)
(reg:V4SI 33 v1)) "":107:25 -1
 (nil))

(insn 12 11 13 (set (reg:OI 92 [ D.6336 ])
(subreg:OI (reg:V4SI 96) 0)) "":107:25 -1
 (nil))

(insn 13 12 0 (set (subreg:V4SI (reg:OI 92 [ D.6336 ]) 16)
(reg:V4SI 97)) "":107:25 -1
 (nil))


So yes this is a dup of bug 93221.

*** This bug has been marked as a duplicate of bug 93221 ***

[Bug target/93221] [10 Regression] ICE maximum number of generated reload insns per insn achieved (90) on aarch64

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93221

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |blocker

[Bug target/93135] [10 Regression] g++.dg/cpp0x/initlist118.C fails on aarch64

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93135

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Andrew Pinski  ---
(insn 6 5 7 2 (set (reg:XI 133)
(subreg:XI (reg:V4SI 134) 0)) "t.cc":19:1 3404 {*aarch64_movxi}
 (expr_list:REG_DEAD (reg:V4SI 134)
(nil)))
(insn 7 6 8 2 (set (subreg:V4SI (reg:XI 133) 16)
(reg:V4SI 135)) "t.cc":19:1 1200 {*aarch64_simd_movv4si}
 (expr_list:REG_DEAD (reg:V4SI 135)
(nil)))


So yes this is a dup of bug 93221.

*** This bug has been marked as a duplicate of bug 93221 ***

[Bug target/93221] [10 Regression] ICE maximum number of generated reload insns per insn achieved (90) on aarch64

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93221

Andrew Pinski  changed:

   What|Removed |Added

 CC||clyon at gcc dot gnu.org

--- Comment #3 from Andrew Pinski  ---
*** Bug 93135 has been marked as a duplicate of this bug. ***

[Bug target/93221] [10 Regression] ICE maximum number of generated reload insns per insn achieved (90) on aarch64

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93221

--- Comment #2 from Andrew Pinski  ---
So we have:
(insn 4 3 5 2 (set (reg:OI 92)
(subreg:OI (reg:V4SI 93) 0)) "t.c":9:1 3402 {*aarch64_movoi}
 (expr_list:REG_DEAD (reg:V4SI 93)
(nil)))
(insn 5 4 7 2 (set (subreg:V4SI (reg:OI 92) 16)
(reg:V4SI 94)) "t.c":9:1 1200 {*aarch64_simd_movv4si}
 (expr_list:REG_DEAD (reg:V4SI 94)
(nil)))

IRA says:
r94: preferred FP_REGS, alternative NO_REGS, allocno FP_REGS
a2 (r94,l0) best FP_REGS, allocno FP_REGS
r93: preferred FP_REGS, alternative NO_REGS, allocno FP_REGS
a3 (r93,l0) best FP_REGS, allocno FP_REGS
r92: preferred FP_REGS, alternative NO_REGS, allocno FP_REGS
a1 (r92,l0) best FP_REGS, allocno FP_REGS


  a1(r92,l0) costs: FP_LO8_REGS:0 FP_LO_REGS:0 FP_REGS:0 MEM:6000
  a2(r94,l0) costs: TAILCALL_ADDR_REGS:12000 GENERAL_REGS:12000
FP_LO8_REGS:2000 FP_LO_REGS:2000 FP_REGS:2000 POINTER_AND_FP_REGS:14000
MEM:5000
  a3(r93,l0) costs: FP_LO8_REGS:2000 FP_LO_REGS:2000 FP_REGS:2000 MEM:5000

[Bug c++/93313] g++: internal compiler error: Segmentation fault signal terminated program cc1plus

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93313

--- Comment #1 from Andrew Pinski  ---
So the problem here is the parser uses the standard stack and therefor limits
the max levels of nested parentheses.  THIS IS NOT a bug really.

[Bug target/93304] RISC-V: Function with interrupt attribute use register without save/restore at prologue/epilogue

2020-01-17 Thread wilson at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93304

Jim Wilson  changed:

   What|Removed |Added

 CC||wilson at gcc dot gnu.org

--- Comment #2 from Jim Wilson  ---
There is a convention of using all caps for function arguments.  See for
instance the riscv_build_integer function comment.  It would be nice to
preserve this convention, but this is a very minor issue.  I usually put a
blank line between the function comment and the function, but again this is a
very minor issue.

The patch looks OK to me.

[Bug target/93119] [ICE] The traditional TLS support of aarch64-ilp32 target may be not perfect while enable fPIC

2020-01-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93119

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||patch
 Status|NEW |ASSIGNED
URL||https://gcc.gnu.org/ml/gcc-
   ||patches/2020-01/msg01075.ht
   ||ml

--- Comment #9 from Andrew Pinski  ---
Patch posted:
https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01075.html

[Bug rtl-optimization/91333] [9/10 Regression] suboptimal register allocation for inline asm

2020-01-17 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91333

--- Comment #6 from Vladimir Makarov  ---
(In reply to Marc Glisse from comment #5)
> 
> However, if I add -mavx, I get
> 
>   vmovapd %xmm0, %xmm2
>   vmovapd %xmm1, %xmm4
>   vmovapd %xmm1, %xmm0
>   vaddsd  %xmm0, %xmm4, %xmm0
>   vmovapd %xmm2, %xmm3
>   vaddsd  %xmm2, %xmm3, %xmm2
>   vaddsd  %xmm0, %xmm2, %xmm0
> 
> That's 2 extra moves compared to the non-avx version, which seems wrong
> since AVX gives more freedom to the RA.
> Those initial moves look quite similar to the ones I get for f with gcc-9
> -O3 -mno-avx, so the optimization looks fragile.

Thank you for reporting this.

I've started to work on this and found that RTL before RA became a bit
different and this changed order of pushing colorable allocnos on coloring
stack and this changed the final assignment.

I hope to find a solution and fix this problem on the next week.  As it is
about heuristics, any fix will need a good benchmarking to confirm the change
and it will take some time.

[Bug ipa/93315] New: ICE in jit testsuite since "Missed function specialization + partial devirtualization" (v8)

2020-01-17 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93315

Bug ID: 93315
   Summary: ICE in jit testsuite since "Missed function
specialization + partial devirtualization" (v8)
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dmalcolm at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

f1ba88b1b20cb579b3b7ce6ce65470205742be7e
"Missed function specialization + partial devirtualization" (v8)
broke most of the jit testsuite.

> @@ -169,7 +261,10 @@ ipa_profile_generate_summary (void)
>basic_block bb;
>  
>hash_table hashtable (10);
> -  
> +
> +  gcc_checking_assert (!call_sums);
> +  call_sums = new ipa_profile_call_summaries (symtab);
> +

Unfortunately, this assertion is failing for most of the testcases in
jit.dg, reducing the number of PASS results in jit.sum from 10473 down
to 3254 in my builds.

The jit code expects to be able to invoke the compiler code more than
once within the same process, purging all state.

It looks like this "call_sums" state needs deleting and resetting to
NULL after the compiler has run (or else we'll likely get an ICE due to
using old symtab/call summaries in subsequent in-process runs of the
compiler).

Candidate patch:
  https://gcc.gnu.org/ml/gcc-patches/2020-01/msg00807.html

[Bug analyzer/93293] 'FAIL: gcc.dg/analyzer/dot-output.c dg-check-dot dot-output.c.state-purge.dot'

2020-01-17 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93293

--- Comment #2 from David Malcolm  ---
Candidate patch: https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01071.html

[Bug analyzer/93291] 'FAIL: gcc.dg/analyzer/pattern-test-2.c' for a few configurations

2020-01-17 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93291

David Malcolm  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2020-01-17
 Ever confirmed|0   |1

--- Comment #3 from David Malcolm  ---
Thanks.

Candidate patch: https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01069.html

[Bug analyzer/93307] ODR violations

2020-01-17 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93307

David Malcolm  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2020-01-17
 Ever confirmed|0   |1

--- Comment #2 from David Malcolm  ---
Candidate patch: https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01068.html

[Bug analyzer/93290] analyzer ICE on isnan()

2020-01-17 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93290

David Malcolm  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from David Malcolm  ---
Should be fixed by the above commit.

[Bug analyzer/93290] analyzer ICE on isnan()

2020-01-17 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93290

--- Comment #1 from CVS Commits  ---
The master branch has been updated by David Malcolm :

https://gcc.gnu.org/g:07c86323a199ca15177d99ad6c488b8f5fb5c729

commit r10-6058-g07c86323a199ca15177d99ad6c488b8f5fb5c729
Author: David Malcolm 
Date:   Thu Jan 16 09:46:30 2020 -0500

analyzer: prevent ICE on isnan (PR 93290)

PR analyzer/93290 reports an ICE on calls to isnan().
The root cause is that an UNORDERED_EXPR is passed
to region_model::eval_condition_without_cm, and there's
a stray gcc_unreachable () in the case where we're comparing
an svalue against itself.

I attempted a more involved patch that properly handled NaN in general
but it seems I've baked the assumption of reflexivity too deeply into
the constraint_manager code.

For now, this patch avoids the ICE and documents the limitation.

gcc/analyzer/ChangeLog:
PR analyzer/93290
* region-model.cc (region_model::eval_condition_without_cm): Avoid
gcc_unreachable for unexpected operations for the case where
we're comparing an svalue against itself.

gcc/ChangeLog
* doc/analyzer.texi (Limitations): Add note about NaN.

gcc/testsuite/ChangeLog:
PR analyzer/93290
* gcc.dg/analyzer/pr93290.c: New test.

[Bug lto/92599] ICE in speculative_call_info, at cgraph.c:1142

2020-01-17 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92599

--- Comment #6 from Jan Hubicka  ---
I guess the problem is that the code expect lto-stmt-uid and call_stmt to be in
sync. This is not true. If call statements are around lto stmt uids are not
maintained.

[Bug c++/93299] [9/10 Regression] ICE in tsubst_copy, at cp/pt.c:15779

2020-01-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93299

Marek Polacek  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #5 from Marek Polacek  ---
https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01059.html

[Bug lto/92599] ICE in speculative_call_info, at cgraph.c:1142

2020-01-17 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92599

--- Comment #5 from Jan Hubicka  ---
I also get similar ICE building Firefox
[task 2020-01-17T20:36:04.213Z] 20:36:04 INFO -
../../gcc-source/gcc/ipa-inline-transform.c:722
[task 2020-01-17T20:36:04.213Z] 20:36:04 INFO -  0x9d8315
execute_one_ipa_transform_pass
[task 2020-01-17T20:36:04.213Z] 20:36:04 INFO -
../../gcc-source/gcc/passes.c:2231
[task 2020-01-17T20:36:04.214Z] 20:36:04 INFO -  0x9d8315
execute_all_ipa_transforms(bool)
[task 2020-01-17T20:36:04.214Z] 20:36:04 INFO -
../../gcc-source/gcc/passes.c:2270
[task 2020-01-17T20:36:04.214Z] 20:36:04 INFO -  0x6dcaa5
cgraph_node::expand()
[task 2020-01-17T20:36:04.214Z] 20:36:04 INFO -
../../gcc-source/gcc/cgraphunit.c:2276
[task 2020-01-17T20:36:04.214Z] 20:36:04 INFO -  0x6ddad7
expand_all_functions
[task 2020-01-17T20:36:04.214Z] 20:36:04 INFO -
../../gcc-source/gcc/cgraphunit.c:2439
[task 2020-01-17T20:36:04.215Z] 20:36:04 INFO -  0x6ddad7
symbol_table::compile()
[task 2020-01-17T20:36:04.215Z] 20:36:04 INFO -
../../gcc-source/gcc/cgraphunit.c:2804
[task 2020-01-17T20:36:04.215Z] 20:36:04 INFO -  0x657751 lto_main()
[task 2020-01-17T20:36:04.215Z] 20:36:04 INFO -
../../gcc-source/gcc/lto/lto.c:658
[task 2020-01-17T20:36:04.215Z] 20:36:04 INFO -  Please submit a full bug
report,
[task 2020-01-17T20:36:04.215Z] 20:36:04 INFO -  with preprocessed source
if appropriate.
[task 2020-01-17T20:36:04.215Z] 20:36:04 INFO -  Please include the
complete backtrace with any bug report.
[task 2020-01-17T20:36:04.215Z] 20:36:04 INFO -  See
 for instructions.
[task 2020-01-17T20:36:04.215Z] 20:36:04ERROR -  make[5]: ***
[/tmp/libmozsqlite3.so.Fzaiyu.ltrans5.ltrans.o] Error 1

[Bug testsuite/92955] [10 regression] gcc.dg/vect/pr60505.c fails starting with r279392

2020-01-17 Thread msc at linux dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92955

Matheus Castanho  changed:

   What|Removed |Added

 CC||msc at linux dot ibm.com

--- Comment #3 from Matheus Castanho  ---
A very similar issue is affecting glibc builds with GCC 10 on powerpc64le. But
it's only failing with -O3 (-O2 is fine). Here's another reproducer in case it
helps (derived from code from iconv):

$ cat overflow-reproducer.c
#include 
typedef struct state {
int count;
char bytes[4];
} state_t;
void foo (
  state_t *state,
  const unsigned char **inptrp,
  const unsigned char *inend)
{
  const unsigned char *inptr = *inptrp;
  size_t inlen;
  for (inlen = 0; inlen < (size_t) (state->count & 7); ++inlen)
/* do something */;
  if (inptr + (4 - inlen) > inend)
{
  while (inptr < inend)
state->bytes[inlen++] = *inptr++;
}
}

$ gcc -O3 -Wall -c overflow-reproducer.c
overflow-reproducer.c: In function ‘foo’:
overflow-reproducer.c:22:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   22 | state->bytes[inlen++] = *inptr++;
  | ~~^~
overflow-reproducer.c:5:10: note: at offset [4, 11] to object ‘bytes’ with size
4 declared here
5 | char bytes[4];
  |  ^

[Bug c/93278] huge almost empty array takes huge time to compile and produces huge object file

2020-01-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93278

Jakub Jelinek  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #7 from Jakub Jelinek  ---
(In reply to doug mcilroy from comment #6)
> The waste of time and space happens in the assembler, but the assembler only
> does what it is told to do. There must be a way for gcc to tell it to put
> array a in a partially filled ELF section.

There is no way to do that in ELF that the compiler could use.  
Sections only have address/size/offset and whether they are allocated or not,
there is no such thing as sections partially backed by the object and partially
zero filled.  The only thing that is there is that some sections might be
instead of the usual @progbits @nobits instead, and that is what you get if
you'll have the variable completely filled with zeros.
For your case, where a variable is partially initialized with non-zeros and
mostly zeros afterwards, you can do it by hand in assembler by making the
variable go from one named section to another one, and arranging that the
linker emits those two sections next to each other, but that isn't something
the compiler can arrange.
In ELF, the segments can be partially backed by data and rest zero initialized.

[Bug c/93278] huge almost empty array takes huge time to compile and produces huge object file

2020-01-17 Thread doug at cs dot dartmouth.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93278

--- Comment #6 from doug mcilroy  ---
The waste of time and space happens in the assembler, but the assembler only
does what it is told to do. There must be a way for gcc to tell it to put array
a in a partially filled ELF section.

$ cat junk.c
char a[1000] = "x";
int main(){ return 0; }

$ bin/gcc --version
bin/gcc (GCC) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


$ time /bin/gcc junk.c

real0m3.864s
user0m2.919s
sys 0m0.326s

$ ls -l a.exe
-rwxr-xr-x 1 DOUG DOUG 10158440 Jan 17 14:43 a.exe

[Bug c/93278] huge almost empty array takes huge time to compile and produces huge object file

2020-01-17 Thread doug at cs dot dartmouth.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93278

--- Comment #5 from doug mcilroy  ---
The waste of time and space happens in the assembler, but the assembler only
does what it is told to do. There must be a way for gcc to tell it to put array
a in a partially filled ELF section.

$ cat junk.c
char a[1000] = "x";
int main(){ return 0; }

$ bin/gcc --version
bin/gcc (GCC) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


$ time /bin/gcc junk.c

real0m3.864s
user0m2.919s
sys 0m0.326s

$ ls -l a.exe
-rwxr-xr-x 1 DOUG DOUG 10158440 Jan 17 14:43 a.exe

[Bug bootstrap/64271] Minimal patches to bootstrap on NetBSD

2020-01-17 Thread n54 at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64271

--- Comment #17 from n54 at gmx dot com ---
On 17.01.2020 18:15, redi at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64271
>
> --- Comment #16 from Jonathan Wakely  ---
> Those patches actually were sent to the list, and I reviewed them, and got no
> reply:
> https://gcc.gnu.org/ml/libstdc++/2014-12/msg00069.html
>

I'm sorry for this, it was probably overlooked.

> I've committed them (after suitable updates) so the libstdc++ parts of this
> should be finished now.
>

Thanks!

> libcilkrts was dropped from GCC mainline. Is the libgfortran/configure patch
> still relevant and needed?
>

We still keep this GTHREAD_USE_WEAK patch locally, but I have no idea
what is/was the original intention with it and who authored it.

The earliest note on it I can see in pkgsrc/lang/gcc47 from 2012/04/16.

Adding TO: tech-toolchain@ as someone could shed light on it.

Re: [Bug bootstrap/64271] Minimal patches to bootstrap on NetBSD

2020-01-17 Thread Kamil Rytarowski
On 17.01.2020 18:15, redi at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64271
>
> --- Comment #16 from Jonathan Wakely  ---
> Those patches actually were sent to the list, and I reviewed them, and got no
> reply:
> https://gcc.gnu.org/ml/libstdc++/2014-12/msg00069.html
>

I'm sorry for this, it was probably overlooked.

> I've committed them (after suitable updates) so the libstdc++ parts of this
> should be finished now.
>

Thanks!

> libcilkrts was dropped from GCC mainline. Is the libgfortran/configure patch
> still relevant and needed?
>

We still keep this GTHREAD_USE_WEAK patch locally, but I have no idea
what is/was the original intention with it and who authored it.

The earliest note on it I can see in pkgsrc/lang/gcc47 from 2012/04/16.

Adding TO: tech-toolchain@ as someone could shed light on it.



[Bug target/92303] [10 regression] gcc.target/sparc/ultrasp12.c times out

2020-01-17 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92303

--- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #2 from Richard Biener  ---
> There's no RA commits in that range, further bisection is needed.

Done now.  I've found r272742 to be the culprit:

2019-06-27  Richard Biener  

* tree-ssa-sccvn.c (vn_reference_lookup_3): Encode valueized RHS.

At r272740,

cc1 -fpreprocessed ultrasp12.i -mptr64 -mstack-bias -mno-v8plus -quiet -m64
-mcpu=ultrasparc -mvis -O2 -o ultrasp12.s

takes less than a second, at r272740 the compilation never terminates.

[Bug c++/93314] Invalid use of non-static data member causes ICE in gimplify_expr

2020-01-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93314

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-01-17
 Ever confirmed|0   |1

[Bug c++/92531] [9 Regression] ICE in uses_template_parms, at cp/pt.c:10471

2020-01-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92531

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Jason Merrill  ---
Fixed.

[Bug libfortran/90374] Fortran 2018: Support d0.d, e0.d, es0.d, en0.d, g0.d and ew.d e0 edit descriptors for output

2020-01-17 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90374

--- Comment #28 from CVS Commits  ---
The master branch has been updated by Jerry DeLisle :

https://gcc.gnu.org/g:82033483fd74b1dcedab416d98673e212258498d

commit r10-6057-g82033483fd74b1dcedab416d98673e212258498d
Author: Jerry DeLisle 
Date:   Fri Jan 17 11:26:10 2020 -0800

PR90374 Zero width format specifiers.

PR libfortran/90374
* io/format.c (parse_format_list): Zero width not allowed with
FMT_D.
* io/write_float.def (build_float_string): Include range of
higher exponent values that require wider width.

[Bug c++/92531] [9 Regression] ICE in uses_template_parms, at cp/pt.c:10471

2020-01-17 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92531

--- Comment #6 from CVS Commits  ---
The releases/gcc-9 branch has been updated by Jason Merrill
:

https://gcc.gnu.org/g:3815f211649cd5c8a277348aa71c9c18bc5ed070

commit r9-8141-g3815f211649cd5c8a277348aa71c9c18bc5ed070
Author: Jason Merrill 
Date:   Fri Jan 17 08:37:49 2020 -0500

PR c++/92531 - ICE with noexcept(lambda).

This was failing because uses_template_parms didn't recognize LAMBDA_EXPR
as
a kind of expression.  Instead of trying to enumerate all the different
varieties of expression and then aborting if what's left isn't
error_mark_node, let's handle error_mark_node and then assume anything else
is an expression.

* pt.c (uses_template_parms): Don't try to enumerate all the
expression cases.

[Bug c++/93286] [10 Regression] ICE: tree check: did not expect class ‘type’, have ‘type’ (reference_type) in convert_from_reference, at cp/cvt.c:550 since g:e0d91792eec490d1

2020-01-17 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93286

--- Comment #5 from CVS Commits  ---
The releases/gcc-9 branch has been updated by Jason Merrill
:

https://gcc.gnu.org/g:5c7938eb3f1a116b1cf9a28090f2cc5e08814ce4

commit r9-8140-g5c7938eb3f1a116b1cf9a28090f2cc5e08814ce4
Author: Jason Merrill 
Date:   Thu Jan 16 16:55:39 2020 -0500

PR c++/93286 - ICE with __is_constructible and variadic template.

Here we had been recursing in tsubst_copy_and_build if type2 was a
TREE_LIST
because that function knew how to deal with pack expansions, and tsubst
didn't.  But tsubst_copy_and_build expects to be dealing with expressions,
so we crash when trying to convert_from_reference a type.

* pt.c (tsubst) [TREE_LIST]: Handle pack expansion.
(tsubst_copy_and_build) [TRAIT_EXPR]: Always use tsubst for type2.

[Bug c++/93314] Invalid use of non-static data member causes ICE in gimplify_expr

2020-01-17 Thread language.lawyer at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93314

--- Comment #1 from Language Lawyer  ---
GCC thinks that `char[S::m]` is VLA (because the lvalue-to-rvalue conversion on
`S::m` lvalue doesn't look like a constant expression) and tries to move the
evaluation of `sizeof(char[S::m])` to run time.

$ g++ prog.cc -pedantic

prog.cc: In function 'int main()':
prog.cc:4:28: warning: ISO C++ forbids variable length array [-Wvla]
4 | return sizeof(char[S::m]);
  |^
prog.cc:4:27: internal compiler error: in gimplify_expr, at gimplify.c:14581
4 | return sizeof(char[S::m]);
  |
...

[Bug target/93312] [10 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1923

2020-01-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93312

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Created attachment 47673
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47673&action=edit
gcc10-pr93312.patch

Untested fix.

[Bug target/93312] [10 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1923

2020-01-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93312

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-01-17
 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |10.0
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
This got broken with r10-6012-g9722215a027b68651c3c7a8af9204d033197e9c0

[Bug c++/92542] [10 Regression] ICE with class template argument deduction following typo

2020-01-17 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92542

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC|paolo.carlini at oracle dot com|
 Resolution|--- |FIXED

--- Comment #5 from Paolo Carlini  ---
Thanks Jon.

[Bug c++/92542] [10 Regression] ICE with class template argument deduction following typo

2020-01-17 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92542

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Paolo Carlini :

https://gcc.gnu.org/g:4c9e5b02f08b1b02f9b498c5121d06dea3f2c1c4

commit r10-6055-g4c9e5b02f08b1b02f9b498c5121d06dea3f2c1c4
Author: Paolo Carlini 
Date:   Fri Jan 17 20:02:21 2020 +0100

Add testcase of PR c++/92542, already fixed.

PR c++/92542
* g++.dg/pr92542.C: New.

[Bug c++/92542] [10 Regression] ICE with class template argument deduction following typo

2020-01-17 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92542

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Paolo Carlini :

https://gcc.gnu.org/g:7e45138702a9c26b00d25db07f92a271b054e304

commit r10-6056-g7e45138702a9c26b00d25db07f92a271b054e304
Author: Paolo Carlini 
Date:   Fri Jan 17 20:03:58 2020 +0100

Add testcase of PR c++/92542, already fixed.

PR c++/92542
* g++.dg/pr92542.C: New.

[Bug c++/93314] New: Invalid use of non-static data member causes ICE in gimplify_expr

2020-01-17 Thread language.lawyer at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93314

Bug ID: 93314
   Summary: Invalid use of non-static data member causes ICE in
gimplify_expr
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: language.lawyer at gmail dot com
  Target Milestone: ---

int main()
{
struct S { int m; };
return sizeof(char[S::m]);
}

$ g++ prog.cc

prog.cc: In function 'int main()':
prog.cc:4:27: internal compiler error: in gimplify_expr, at gimplify.c:14581
4 | return sizeof(char[S::m]);
  |~~~^
0x5c6160 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../source/gcc/gimplify.c:14581
0x9a7434 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../source/gcc/gimplify.c:13885
0x9a7de0 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../source/gcc/gimplify.c:13702
0x9aa19f gimplify_compound_lval
../../source/gcc/gimplify.c:3064
0x9a6c00 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../source/gcc/gimplify.c:13533
0x9a7434 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../source/gcc/gimplify.c:13885
0x9a7129 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../source/gcc/gimplify.c:14348
0x9abfb0 internal_get_tmp_var
../../source/gcc/gimplify.c:619
0x9ac749 get_initialized_tmp_var(tree_node*, gimple**, gimple**, bool)
../../source/gcc/gimplify.c:674
0x9ac749 gimplify_save_expr
../../source/gcc/gimplify.c:6072
0x9a7621 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../source/gcc/gimplify.c:13881
0x9a7434 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../source/gcc/gimplify.c:13885
0x9a7129 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../source/gcc/gimplify.c:14348
0x9a7434 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../source/gcc/gimplify.c:13885
0x9b1ecb gimplify_modify_expr
../../source/gcc/gimplify.c:5765
0x9a73a2 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../source/gcc/gimplify.c:13581
0x9acc8e gimplify_stmt(tree_node**, gimple**)
../../source/gcc/gimplify.c:6822
0x9acc8e gimplify_and_add(tree_node*, gimple**)
../../source/gcc/gimplify.c:486
0x9acc8e gimplify_return_expr
../../source/gcc/gimplify.c:1667
0x9a8303 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../source/gcc/gimplify.c:13842
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

(https://wandbox.org/permlink/GNNTjXAK2pQ5clUt)

I've selectively checked about some of g++ versions, from 4.4.7 to HEAD, on
wandbox.org. They're all crashing, just segfaulting before 5.1.0 and ICEing in
gimplify_expr starting from 5.1.0.

[Bug c++/93313] New: g++: internal compiler error: Segmentation fault signal terminated program cc1plus

2020-01-17 Thread herschel at hep dot phy.cam.ac.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93313

Bug ID: 93313
   Summary: g++: internal compiler error: Segmentation fault
signal terminated program cc1plus
   Product: gcc
   Version: 9.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: herschel at hep dot phy.cam.ac.uk
  Target Milestone: ---

I would like to report an apparent bug in the c++ compiler: the compiler
segfaults when trying to compile my code, and it asks me to report the bug.

I wrote my program to evaluate a large expression (a polynomial). For smaller
expressions (200 KB), the program compiles without problems. However, for this
large expression (23 MB), the compiler segfaults.

The compiler isn't running out of RAM (it used only ~8GB before crashing, even
on a machine with ~200 GB RAM).

I have tried compiling on my laptop [gcc version 9.2.1 20191008 (Ubuntu
9.2.1-9ubuntu2)] as well as on a server [gcc version 7.3.1 20180303 (Red Hat
7.3.1-5) (GCC)].

Here is the output of "gcc -v":

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.2.1-9ubuntu2'
--with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-9
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib
--with-target-system-zlib=auto --enable-multiarch --disable-werror
--with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32
--enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,hsa
--without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.2.1 20191008 (Ubuntu 9.2.1-9ubuntu2) 

Here is the command I used to try to compile my program:

g++ myexample.cpp -o myexample -I/home/herschel/usr/include/firefly/
-L/home/herschel/usr/lib/firefly -lfirefly -lgmp -lz -lflint -lgmpxx
-save-temps

Here is the complete output from gcc:

g++: internal compiler error: Segmentation fault signal terminated program
cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

The pre-processed file "myexample.ii" is large (25MB), for the reasons
explained at the start of this report. This makes it too large to include as an
attachment, and I have instead uploaded it to:

https://www.hep.phy.cam.ac.uk/~herschel/myexample.ii

[Bug target/93312] New: [10 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1923

2020-01-17 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93312

Bug ID: 93312
   Summary: [10 Regression] ICE: RTL check: expected code 'reg',
have 'subreg' in rhs_regno, at rtl.h:1923
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: ice-checking, ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: armv7a-hardfloat-linux-gnueabi

Created attachment 47672
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47672&action=edit
reduced testcase

This triggers while building libgcc2.o with RTL checking enabled.

$ cc1 -quiet -O testcase.c
during RTL pass: combine
testcase.c: In function 'foo':
testcase.c:8:1: internal compiler error: RTL check: expected code 'reg', have
'subreg' in rhs_regno, at rtl.h:1923
8 | }
  | ^
0x6ca66c rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int,
char const*)
/repo/gcc-trunk/gcc/rtl.c:879
0x7939ac rhs_regno
/repo/gcc-trunk/gcc/rtl.h:1923
0x79fbf4 rhs_regno
/repo/gcc-trunk/gcc/config/arm/arm.c:13807
0x79fbf4 clear_operation_p(rtx_def*, bool)
/repo/gcc-trunk/gcc/config/arm/arm.c:13782
0x174b80a clear_multiple_operation_1
/repo/gcc-trunk/gcc/config/arm/predicates.md:551
0x174b80a clear_multiple_operation(rtx_def*, machine_mode)
/repo/gcc-trunk/gcc/config/arm/predicates.md:558
0x17aac6f recog_41
/repo/gcc-trunk/gcc/config/arm/vfp.md:1989
0x183e0d7 recog(rtx_def*, rtx_insn*, int*)
/repo/gcc-trunk/gcc/config/arm/arm-fixed.md:558
0x187516f recog_for_combine_1
/repo/gcc-trunk/gcc/combine.c:11447
0x187fe9e recog_for_combine
/repo/gcc-trunk/gcc/combine.c:11717
0x189569b try_combine
/repo/gcc-trunk/gcc/combine.c:3656
0x1899a73 combine_instructions
/repo/gcc-trunk/gcc/combine.c:1303
0x1899a73 rest_of_handle_combine
/repo/gcc-trunk/gcc/combine.c:15059
0x1899a73 execute
/repo/gcc-trunk/gcc/combine.c:15104
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.

$ xgcc -v
Using built-in specs.
COLLECT_GCC=/repo/build-trunk-20200117170346-0ba6a850b59-checking-yes-rtl-df-extra-armv7a-hardfloat/./gcc/xgcc
Target: armv7a-hardfloat-linux-gnueabi
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --with-float=hard --with-fpu=vfpv4
--with-arch=armv7-a --with-sysroot=/usr/armv7a-hardfloat-linux-gnueabi
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=armv7a-hardfloat-linux-gnueabi
--with-ld=/usr/bin/armv7a-hardfloat-linux-gnueabi-ld
--with-as=/usr/bin/armv7a-hardfloat-linux-gnueabi-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20200117170346-0ba6a850b59-checking-yes-rtl-df-extra-armv7a-hardfloat
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.1 20200117 (experimental) (GCC)

[Bug testsuite/90565] [10 regression] test cases gcc.dg/uninit-18.c and uninit-pr90394-1-gimple.c broken as of r271460

2020-01-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90565

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #5 from Jakub Jelinek  ---
Thanks.  Assuming it is fixed then, if not, please reopen.

[Bug testsuite/90565] [10 regression] test cases gcc.dg/uninit-18.c and uninit-pr90394-1-gimple.c broken as of r271460

2020-01-17 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90565

Alexander Monakov  changed:

   What|Removed |Added

 CC||amonakov at gcc dot gnu.org

--- Comment #4 from Alexander Monakov  ---
I think this should have been fully resolved by PR90587 fix as indicated by
Vlad in his gcc-patches message:
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg01600.html

[Bug c++/93299] [9/10 Regression] ICE in tsubst_copy, at cp/pt.c:15779

2020-01-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93299

Marek Polacek  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug lto/91027] [10 regression] SEGV in hash_table::find_slot_with_hash

2020-01-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91027

--- Comment #9 from Jakub Jelinek  ---
I think D bugs shouldn't block the release, shouldn't this be P4?

[Bug testsuite/90565] [10 regression] test cases gcc.dg/uninit-18.c and uninit-pr90394-1-gimple.c broken as of r271460

2020-01-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90565

--- Comment #3 from Jakub Jelinek  ---
Looking at gcc-testresults, this seems to be long fixed, isn't it?
At least, I see both uninit-18.c and uninit-pr90394-1-gimple.c FAIL and not
FAIL pretty randomly in May, but certainly haven't seen them in recent
testresults, nor can reproduce with a cross-compiler to powerpc64le-linux and
valgrind is clean on it too.  So, can we close this?

[Bug c++/93299] [9/10 Regression] ICE in tsubst_copy, at cp/pt.c:15779

2020-01-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93299

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

[Bug bootstrap/64271] Minimal patches to bootstrap on NetBSD

2020-01-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64271

--- Comment #16 from Jonathan Wakely  ---
Those patches actually were sent to the list, and I reviewed them, and got no
reply:
https://gcc.gnu.org/ml/libstdc++/2014-12/msg00069.html

I've committed them (after suitable updates) so the libstdc++ parts of this
should be finished now.

libcilkrts was dropped from GCC mainline. Is the libgfortran/configure patch
still relevant and needed?

[Bug libstdc++/69724] Unnecessary temporary object during std::thread construction

2020-01-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69724

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|10.0|11.0

--- Comment #6 from Jonathan Wakely  ---
(In reply to Jonathan Wakely from comment #5)
> I'm leaving this open until std::async is changed too.

Which isn't in scope for GCC 10 now.

[Bug libstdc++/66742] abort on sorting list with custom allocator that is not stateless

2020-01-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66742

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|10.0|11.0

[Bug libstdc++/90295] Please define ~exception_ptr inline

2020-01-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90295

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
   Assignee|redi at gcc dot gnu.org|unassigned at gcc dot 
gnu.org
   Target Milestone|10.0|11.0

[Bug libstdc++/90704] filesystem::path overloads for file streams are not conforming

2020-01-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90704

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
   Assignee|redi at gcc dot gnu.org|unassigned at gcc dot 
gnu.org
   Target Milestone|10.0|11.0

--- Comment #1 from Jonathan Wakely  ---
This isn't going to get fixed for GCC 10.1, sorry.

[Bug c++/93299] [9/10 Regression] ICE in tsubst_copy, at cp/pt.c:15779

2020-01-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93299

--- Comment #4 from Marek Polacek  ---
force_paren_expr now creates a VIEW_CONVERT_EXPR:
+  expr = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (expr), expr);
+  REF_PARENTHESIZED_P (expr) = true;
but it's not a case that tsubst_copy can handle:
16426   /* We shouldn't see any other uses of these in templates.  */
16427   gcc_unreachable ();
as it's not a location_wrapper_p or a TEMPLATE_PARM_INDEX wrapper in a
VIEW_CONVERT_EXPR.

[Bug libstdc++/92376] [8/9 Regression] bootstrap fails with --disable-hosted-libstdcxx

2020-01-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92376

Jonathan Wakely  changed:

   What|Removed |Added

Summary|[8/9/10 Regression] |[8/9 Regression] bootstrap
   |bootstrap fails with|fails with
   |--disable-hosted-libstdcxx  |--disable-hosted-libstdcxx

--- Comment #4 from Jonathan Wakely  ---
Fixed on trunk so far.

[Bug libstdc++/92376] [8/9/10 Regression] bootstrap fails with --disable-hosted-libstdcxx

2020-01-17 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92376

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Jonathan Wakely :

https://gcc.gnu.org/g:0ba6a850b597236832140bf57bf6083b6fab93f9

commit r10-6049-g0ba6a850b597236832140bf57bf6083b6fab93f9
Author: Jonathan Wakely 
Date:   Fri Jan 17 15:49:02 2020 +

libstdc++: Fix freestanding build PR 92376)

In a freestanding library we don't install the 
header, so don't try to include it unless it exists.

Explicitly declare aligned alloc functions for freestanding, because
 doesn't declare them.

PR libstdc++/92376
* include/bits/c++config: Only do PSTL config when the header is
present, to fix freestanding.
* libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
functions if they were detected by configure.

[Bug middle-end/93076] [10 Regression] internal compiler error: Segmentation fault during GIMPLE pass: cddce

2020-01-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93076

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #5 from Jakub Jelinek  ---
The #c0 ICE has been fixed with r280126, so it is yet another dup of the many
tree sharing PRs.

*** This bug has been marked as a duplicate of bug 93173 ***

[Bug c++/93173] [10 Regression] "error: incorrect sharing of tree nodes" and "internal compiler error: verify_gimple failed"

2020-01-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93173

Jakub Jelinek  changed:

   What|Removed |Added

 CC||raj.khem at gmail dot com

--- Comment #5 from Jakub Jelinek  ---
*** Bug 93076 has been marked as a duplicate of this bug. ***

[Bug c++/93311] Missing "warning" when instantiating a constexpr function

2020-01-17 Thread kuzniar95 at o2 dot pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93311

kuzniar95 at o2 dot pl changed:

   What|Removed |Added

 Resolution|DUPLICATE   |FIXED

--- Comment #2 from kuzniar95 at o2 dot pl ---
@Jonathan Wakely
I've managed to find an online GCC10 compiler so I can now confirm that it's
indeed been fixed. Thanks!

[Bug tree-optimization/92788] [10 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2313

2020-01-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92788

--- Comment #4 from Jakub Jelinek  ---
The problem is exactly in the EH edge purging being delayed, if it would be
done before thread_through_all_blocks, then it might work.  But not sure if the
edge purging doesn't invalidate something that thread_through_all_blocks relies
on (and we'd need to repeat the EH edge purging after
thread_through_all_blcoks).

[Bug middle-end/92815] [8/9/10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct

2020-01-17 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92815

Martin Sebor  changed:

   What|Removed |Added

   Keywords||wrong-code

--- Comment #3 from Martin Sebor  ---
The is a bug in the object size pass that has existed since its introduction. 
The addr_object_size() computes the size of the extern object based on its
type, not taking into consideration that, as an extension, GCC allows flexible
array members to be initialized to more elements than would otherwise fit into
the struct.  To avoid this, the function needs to conservatively fail for
uninitialized extern structs with a flexible array member.

The modified test case below illustrates it.  With _FORTIFY_SOURCE defined, it
aborts.

$ cat pr92815.c && gcc -O2 -Wall -c pr92815.c && gcc -D_FORTIFY_SOURCE=2 -DMAIN
-O2 -Wall pr92815.c pr92815.o && ./a.out
#include 

struct S { int n; char ax[]; };

#if MAIN
extern struct S s;
__attribute__ ((noipa)) void g (void)
{
  strcpy (s.ax, "123");
}
int main (void) { g (); }
#else
struct S s = { 5, { 1, 2, 3, 4, 5 } };
#endif

In file included from /usr/include/string.h:494,
 from pr92815.c:1:
In function ‘strcpy’,
inlined from ‘g’ at pr92815.c:9:3:
/usr/include/bits/string_fortified.h:90:10: warning: ‘__builtin___strcpy_chk’
writing 4 bytes into a region of size 0 [-Wstringop-overflow=]
   90 |   return __builtin___strcpy_chk (__dest, __src, __bos (__dest));
  |  ^~
pr92815.c: In function ‘g’:
pr92815.c:6:17: note: at offset 0 to object ‘s’ with size 4 declared here
6 | extern struct S s;
  | ^
In file included from /usr/include/string.h:494,
 from pr92815.c:1:
In function ‘strcpy’,
inlined from ‘g’ at pr92815.c:9:3:
/usr/include/bits/string_fortified.h:90:10: warning: ‘__builtin___memcpy_chk’
offset [4, 7] is out of the bounds [0, 4] of object ‘s’ with type ‘struct S’
[-Warray-bounds]
   90 |   return __builtin___strcpy_chk (__dest, __src, __bos (__dest));
  |  ^~
pr92815.c: In function ‘g’:
pr92815.c:6:17: note: ‘s’ declared here
6 | extern struct S s;
  | ^
*** buffer overflow detected ***: ./a.out terminated
Aborted (core dumped)

[Bug c++/93299] [9/10 Regression] ICE in tsubst_copy, at cp/pt.c:15779

2020-01-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93299

--- Comment #3 from Marek Polacek  ---
Seems to have started with g:e4511ca2e9ecdb51d41b64452398f8e2df575668.

[Bug c++/93299] [9/10 Regression] ICE in tsubst_copy, at cp/pt.c:15779

2020-01-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93299

Marek Polacek  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|WAITING |NEW
 CC||mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek  ---
class : d<0> {

certainly not valid.  But this one seems to be valid and still ICEs:

template  struct a {
  enum { b = 8 };
};
class c;
template  class __attribute__((aligned((a::b d {};
class c : d<0> { };

[Bug c++/93310] Incorrect constexpr virtual evaluation inside a constructor

2020-01-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93310

Marek Polacek  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-01-17
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed.

[Bug c/57612] add builtin to assert that expression does not have side effects

2020-01-17 Thread tromey at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57612

--- Comment #4 from Tom Tromey  ---
(In reply to H. Peter Anvin from comment #2)
> I would like to second this request, however, I would like to request that
> it issues a warning rather than an error.  It can always be promoted to an
> error via -Werror= or the equivalent pragma.

What's the use case for this?
It seems simpler to just not use this macro when you don't want the effect.

(In reply to felix from comment #3)
> Overlaps bug 6906. Under that ticket, I proposed adding a built-in that
> simply returns whether or not a given expression has side effects, simply by
> exposing TREE_SIDE_EFFECTS().

This seems the same to me, in that __builtin_assert_no_side_effects
could, I think, just be a static_assert using your builtin.

[Bug libstdc++/92376] [8/9/10 Regression] bootstrap fails with --disable-hosted-libstdcxx

2020-01-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92376

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|9.3 |8.4
Summary|[9/10 Regression] bootstrap |[8/9/10 Regression]
   |fails with  |bootstrap fails with
   |--disable-hosted-libstdcxx  |--disable-hosted-libstdcxx

--- Comment #2 from Jonathan Wakely  ---
I'm not sure if the aligned_alloc problem started with gcc-6 or gcc-7, but it's
definitely present in gcc-8 so needs fixing there too.

[Bug fortran/93175] ICE involving nested parameterized derived types

2020-01-17 Thread markeggleston at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93175

markeggleston at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-01-17
 CC||markeggleston at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from markeggleston at gcc dot gnu.org ---
Confirmed.

For master (10.0)

at https://gcc.gnu.org/g:6ed8c923325c9b2fcb30996fa14582ac136d9329

pr93175.f90:30:0:

   30 | end program pdt_test
  | 
internal compiler error: Segmentation fault
0xd8158f crash_signal
../../gcc/gcc/toplev.c:328
0x6acc63 insert_parameter_exprs
../../gcc/gcc/fortran/decl.c:3542
0x6cbd19 gfc_traverse_expr(gfc_expr*, gfc_symbol*, bool (*)(gfc_expr*,
gfc_symbol*, int*), int)
../../gcc/gcc/fortran/expr.c:5188
0x78c245 structure_alloc_comps
../../gcc/gcc/fortran/trans-array.c:9522
0x790766 gfc_allocate_pdt_comp(gfc_symbol*, tree_node*, int,
gfc_actual_arglist*)
../../gcc/gcc/fortran/trans-array.c:9838
0x78b313 structure_alloc_comps
../../gcc/gcc/fortran/trans-array.c:9597
0x790766 gfc_allocate_pdt_comp(gfc_symbol*, tree_node*, int,
gfc_actual_arglist*)
../../gcc/gcc/fortran/trans-array.c:9838
0x7a460f gfc_trans_deferred_vars(gfc_symbol*, gfc_wrapped_block*)
../../gcc/gcc/fortran/trans-decl.c:4653
0x7a7a33 gfc_generate_function_code(gfc_namespace*)
../../gcc/gcc/fortran/trans-decl.c:6928
0x722fb8 translate_all_program_units
../../gcc/gcc/fortran/parse.c:6302
0x722fb8 gfc_parse_file()
../../gcc/gcc/fortran/parse.c:6541
0x76e30f gfc_be_parse_file
../../gcc/gcc/fortran/f95-lang.c:210

Also occurs on releases/gcc-8 checked 8.1.0 and 8.5.0 and on releases/gcc-9
checked 9.2.0

[Bug preprocessor/80005] cpp expands __has_include() filename parts

2020-01-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80005

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
--- libcpp/expr.c.jj2020-01-17 15:21:20.450514947 +0100
+++ libcpp/expr.c   2020-01-17 16:37:55.298369858 +0100
@@ -2202,12 +2202,16 @@ parse_has_include (cpp_reader *pfile, en
   result.low = 0;

   pfile->state.in__has_include__++;
+  bool saved_angled_headers = pfile->state.angled_headers;
+  pfile->state.angled_headers = 1;

   const cpp_token *token = cpp_get_token (pfile);
   bool paren = token->type == CPP_OPEN_PAREN;
   if (paren)
 token = cpp_get_token (pfile);

+  pfile->state.angled_headers = saved_angled_headers;
+
   bool bracket = token->type != CPP_STRING;
   cpp_hashnode *node = NULL;
   char *fname = NULL;
fixes this for me.

  1   2   3   >