[Bug tree-optimization/77399] Poor code generation for vector casts and loads

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77399

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #18 from Andrew Pinski  ---
(In reply to Alexander Monakov from comment #17)
> Test shown in comment #2 is still not optimized at -O2, so as comment #12
> said,
> 
> > Load part remains.
> 
> Not sure if that needs to be split off into a separate bug.

The load part was taken care of in GCC 10.

(In reply to Andrew Pinski from comment #2)
> Confirmed.
> 
> One extra case:

This one is optimized since GCC 10.  The original case in comment #0 has been
optimized since GCC 7.

so yes this case be closed now.

[Bug tree-optimization/82189] Two stage SLP needed

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82189

--- Comment #2 from Andrew Pinski  ---
We do better now:

ldp s1, s3, [x1]
dup v0.4s, v0.s[0]
ldr s2, [x2, 4]
ins v1.s[1], v3.s[0]
ld1 {v1.s}[2], [x2]
ins v1.s[3], v2.s[0]
fdivv1.4s, v1.4s, v0.4s
str q1, [x0]


  _19 = {t_12(D), t_12(D), t_12(D), t_12(D)};
  _1 = *b_9(D);
  _3 = MEM[(float *)b_9(D) + 4B];
  _5 = *c_15(D);
  _7 = MEM[(float *)c_15(D) + 4B];
  _20 = {_1, _3, _5, _7};
  vect__2.3_18 = _20 / _19;
  MEM  [(float *)a_11(D)] = vect__2.3_18;

But we still don't Do the merging of the loads.

[Bug tree-optimization/71992] Missed BB SLP vectorization in GCC

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71992

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
   Last reconfirmed|2016-07-25 00:00:00 |2021-8-10

[Bug tree-optimization/92655] Suboptimal vectorization of variable shift

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92655

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug debug/101598] [debug, ada] .loc generated for defs__struct1IP

2021-08-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101598

--- Comment #9 from CVS Commits  ---
The master branch has been updated by Bernd Edlinger :

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

commit r12-2846-ga45918f8a7444a40eb397a037683ba5900a2db74
Author: Bernd Edlinger 
Date:   Sat Jul 24 12:53:39 2021 +0200

Ada: Remove debug line number for DECL_IGNORED_P functions

It was pointed out in PR101598 to be inappropriate, that
ignored Ada decls receive the source line number which was
recorded in the function decl's DECL_SOURCE_LOCATION.
Therefore set all front-end-generated Ada decls with
DECL_IGNORED_P to UNKNOWN_LOCATION.

2021-08-11  Bernd Edlinger  

PR debug/101598
* gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the
DECL_SOURCE_LOCATION of DECL_IGNORED_P gnu_subprog_decl to
UNKNOWN_LOCATION.

[Bug tree-optimization/89810] Suboptimal codegen: integer load/assemble from in-register array of uint8_t

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89810

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2021-08-11
   Severity|normal  |enhancement
 Status|UNCONFIRMED |NEW

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

[Bug tree-optimization/55629] Missed value numbering to a constant

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55629

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug tree-optimization/88916] [x86] suboptimal code generated for integer comparisons joined with boolean operators

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88916

Andrew Pinski  changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu.org
   Severity|normal  |enhancement

[Bug tree-optimization/84515] missed optimization: expected loop merging

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84515

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug tree-optimization/84470] test for address of member being null not eliminated

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84470

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug tree-optimization/63278] Fails to compute loop bound from constant string

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63278

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug tree-optimization/50346] Function call foils VRP/jump-threading of redundant predicate on struct member

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50346

Andrew Pinski  changed:

   What|Removed |Added

 Blocks||23384
   Last reconfirmed|2011-09-10 00:00:00 |2021-8-10
   Severity|normal  |enhancement

--- Comment #10 from Andrew Pinski  ---
This is basically PR 23384 really.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23384
[Bug 23384] escaped set should be flow sensitive

[Bug tree-optimization/68329] [4.8 4.9]gcc using array index to accelerate loop running , why turn off at gcc 5.X

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68329

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Keywords||missed-optimization
   Last reconfirmed||2021-08-11

--- Comment #3 from Andrew Pinski  ---
Looks like we lost somehow between 4.9.0 and 5.1.0 the information that
"*(pTeam->index + i)" were i!=0 is undefined.  index is not the last field
either so this should be supported.

[Bug target/101846] Improve __builtin_shufflevector emitted code

2021-08-10 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101846

--- Comment #2 from Hongtao.liu  ---
For foo, vmovdqa is avx_vec_concatv16si/2, and we can add define_insn_and_split
to combine avx_vec_concatv16si/2 and avx512f_zero_extendv16hiv16si2_1, similar
for other modes in pmovzx{bw,wd,dq}.

For bar, we need to match pmov{wb,dw,qd} in ix86_vectorize_vec_perm_const when
only one operand is used and selector are truncate index, just like we did for
pmovzx.

I'll take this.

[Bug libstdc++/79700] std::fabsf and std::fabsl missing from

2021-08-10 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

康桓瑋  changed:

   What|Removed |Added

 CC||hewillk at gmail dot com

--- Comment #17 from 康桓瑋  ---
*** Bug 101855 has been marked as a duplicate of this bug. ***

[Bug libstdc++/101855] std::logf is missing from

2021-08-10 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101855

康桓瑋  changed:

   What|Removed |Added

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

--- Comment #2 from 康桓瑋  ---
This is Bug 79700.

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

[Bug libstdc++/101855] std::logf is missing from

2021-08-10 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101855

--- Comment #1 from 康桓瑋  ---
(In reply to 康桓瑋 from comment #0)
> #include 
> auto f = std::log10f(3.14);
> 
> :2:15: error: 'log10f' is not a member of 'std'; did you mean
> 'log1pf'?
> 2 | auto f = std::log10f(3.14);
>   |   ^~
>   |   log1pf

It seems that libstdc++'s  misses a lot of functions in [c.math], I
don't know if this is intentional.

[Bug libstdc++/101855] New: std::logf is missing from

2021-08-10 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101855

Bug ID: 101855
   Summary: std::logf is missing from 
auto f = std::log10f(3.14);

:2:15: error: 'log10f' is not a member of 'std'; did you mean 'log1pf'?
2 | auto f = std::log10f(3.14);
  |   ^~
  |   log1pf

https://godbolt.org/z/rW3Kjeq6n

[Bug tree-optimization/49782] Missed optimization due to dependency analysis

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49782

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2021-08-11
 Status|UNCONFIRMED |NEW
   Keywords||missed-optimization
 Ever confirmed|0   |1

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

[Bug go/101851] gccgo crashes compiling `x, y := int(0)`

2021-08-10 Thread ian at airs dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101851

Ian Lance Taylor  changed:

   What|Removed |Added

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

--- Comment #2 from Ian Lance Taylor  ---
Thanks.  Fixed on mainline.

[Bug go/101851] gccgo crashes compiling `x, y := int(0)`

2021-08-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101851

--- Comment #1 from CVS Commits  ---
The master branch has been updated by Ian Lance Taylor :

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

commit r12-2845-gfed7c1634e8e50600e20cb97dbfbd74ecbd5ba22
Author: Ian Lance Taylor 
Date:   Tue Aug 10 16:13:01 2021 -0700

compiler: don't crash on a, b := int(0)

Fixes PR go/101851

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/341330

[Bug target/98309] [AVX512] Missing expander for ldexpm3.

2021-08-10 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98309

--- Comment #2 from Hongtao.liu  ---
Although avx512 have vscalefps/d, vectorizer failed at 
```
  /* We can only handle calls with arguments of the same type.  */
  if (rhs_type
  && !types_compatible_p (rhs_type, TREE_TYPE (op)))
{
  if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
 "argument types differ.\n");
  return false;
}
```

since __builtin_ldexp is defined as BT_FN_DOUBLE_DOUBLE_INT with 2 different
type arguments.

[Bug target/98309] [AVX512] Missing expander for ldexpm3.

2021-08-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98309

--- Comment #1 from CVS Commits  ---
The master branch has been updated by hongtao Liu :

https://gcc.gnu.org/g:05a03f3986db25cb5076b409f4048e9dbb5dbfdf

commit r12-2844-g05a03f3986db25cb5076b409f4048e9dbb5dbfdf
Author: liuhongt 
Date:   Tue Aug 10 19:00:18 2021 +0800

Extend ldexp{s,d}f3 to vscalefs{s,d} when TARGET_AVX512F and
TARGET_SSE_MATH.

gcc/ChangeLog:

PR target/98309
* config/i386/i386.md (ldexp3): Extend to vscalefs[sd]
when TARGET_AVX512F and TARGET_SSE_MATH.

gcc/testsuite/ChangeLog:

PR target/98309
* gcc.target/i386/pr98309-1.c: New test.
* gcc.target/i386/pr98309-2.c: New test.

[Bug tree-optimization/101451] Incorrect -Wstringop-truncation warning

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101451

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2021-08-11
 Status|UNCONFIRMED |WAITING
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
The warning in the attached testcase is correct.  strncat if truncated does not
put a null character.
The reason why you only get the warning once is because GCC decided the
functions are the same. If you swap the order of good and bad in the source you
will get a warning for the good function.

If you add:
dest[sizeof(dest) - 1] = 0;
After the strncat, the warning goes away.


strncat in this case will only do "sizeof(dest) - 1" in copying and will not
copy the null character.

>However, I cannot produce a simple test case to reproduce it.
Do you have a full testcase that you can share, we will try to reduce it and
see why it is still failing.

[Bug objc/101718] Objective-C frontend emits wrong code to call methods returning scalar types returned in memory

2021-08-10 Thread mhjacobson at me dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101718

--- Comment #2 from Matt Jacobson  ---
(In reply to Iain Sandoe from comment #1)
> can you give me some idea of the platform? it would help with testing at
> least (assuming that there is a suitable machine on the cfarm).

Sure, but I'm guessing it's not going to be very helpful!  The platform I'm
using is an AVR microcontroller, with my own custom NeXT-v2-ABI-compliant
runtime.




> Having said that, there could be some types for which this would fire even
> on Darwin.

Hm -- I'm not so sure.

The x86_64 calling convention allocates *two* (64-bit) registers to
integer/pointer return values, so `__int128` doesn't require memory. 
Similarly, it can return `_Complex double` via multiple SSE registers. 
Finally, there's also `_Complex long double`, which is returned via the x87
stack (and for which there is yet another messenger routine,
`objc_msgSend_fp2ret`).

In fact, a close reading of the ABI spec suggests that the *only* types that
would ever be returned through memory are structs and unions.  So the code here
would work.

[Bug middle-end/101674] gcc.dg/uninit-pred-9_b.c fails after jump threading rewrite

2021-08-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101674

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Hans-Peter Nilsson :

https://gcc.gnu.org/g:92f7016940e5a7281e3fd7628fbf1360d900b581

commit r12-2843-g92f7016940e5a7281e3fd7628fbf1360d900b581
Author: Hans-Peter Nilsson 
Date:   Wed Aug 11 01:40:12 2021 +0200

gcc.dg/uninit-pred-9_b.c: Xfail for CRIS too

Adding to the growing list, for autotester accounting purposes.

FWIW I see this fails for m68k too:
https://gcc.gnu.org/pipermail/gcc-testresults/2021-August/712395.html
and moxie:
https://gcc.gnu.org/pipermail/gcc-testresults/2021-August/712389.html
and pru:
https://gcc.gnu.org/pipermail/gcc-testresults/2021-August/712366.html

testsuite:
PR middle-end/101674
* gcc.dg/uninit-pred-9_b.c: Xfail for cris-*-* too.

[Bug middle-end/66364] poor optimization of packed structs containing bitfields

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66364

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Severity|normal  |enhancement
 Ever confirmed|0   |1
   Last reconfirmed||2021-08-11
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org

--- Comment #2 from Andrew Pinski  ---
Mine for GCC 13.

[Bug tree-optimization/101854] [11/12 Regression] Invalid warning -Wstringop-overflow wrong argument

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854

--- Comment #6 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #5)
> __attribute__((access ("^0[2]^1[6]", )))
> struct Weird g (const float * Q, const float[8] * null)
> 
>   ss = g (, 0B); [return slot optimization]

In the 4 case we get:
  ss = g (, 0B);

So no RSO.
So yes the code looks like it is counting wrong somewhere.

[Bug tree-optimization/101854] [11/12 Regression] Invalid warning -Wstringop-overflow wrong argument

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854

Andrew Pinski  changed:

   What|Removed |Added

Summary|Invalid warning |[11/12 Regression] Invalid
   |-Wstringop-overflow wrong   |warning -Wstringop-overflow
   |argument|wrong argument
   Target Milestone|--- |11.3

[Bug tree-optimization/101854] Invalid warning -Wstringop-overflow wrong argument

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854

--- Comment #5 from Andrew Pinski  ---
__attribute__((access ("^0[2]^1[6]", )))
struct Weird g (const float * Q, const float[8] * null)

  ss = g (, 0B); [return slot optimization]

[Bug tree-optimization/101854] Invalid warning -Wstringop-overflow wrong argument

2021-08-10 Thread nightstrike at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854

--- Comment #4 from nightstrike  ---
(In reply to Andrew Pinski from comment #3)
> So this is not related to nested functions at all (just in case people
> thought it was):

It's also not due to flexible array members, given the change from 5 members to
an array. I only mention it because I've submitted a report in the past about a
different warning that was affected by that feature of C.

[Bug tree-optimization/101854] Invalid warning -Wstringop-overflow wrong argument

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854

--- Comment #3 from Andrew Pinski  ---
So this is not related to nested functions at all (just in case people thought
it was):
struct Weird {
float a[5]; // decrease to 4 will cause the warning to disappear
};
struct Weird g(float const Q[2], float const null[6][8]) {
return (struct Weird){0};
}
void f() {
float const q[2]={0};
struct Weird ss = g(q, (void *)0);
}

[Bug c/101854] Invalid warning -Wstringop-overflow wrong argument

2021-08-10 Thread nightstrike at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854

nightstrike  changed:

   What|Removed |Added

  Component|tree-optimization   |c
   Keywords|diagnostic  |

--- Comment #2 from nightstrike  ---
So to clarify, the "192 bytes" is the size of the flagged argument #2.  The
"size 8" is the size of the first argument.  If you change q and Q to be 3
elements, then size is 12, etc.

[Bug tree-optimization/101854] Invalid warning -Wstringop-overflow wrong argument

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854

--- Comment #1 from Andrew Pinski  ---
Slightly more reduced:
void f() {
struct Weird {
float a[5]; // decrease to 4 will cause the warning to
disappear
};
struct Weird g(float const Q[2], float const null[6][8]) {
return (struct Weird){0};
}

float const q[2];
struct Weird ss = g(q, (void *)0);
}

[Bug c/101854] New: Invalid warning -Wstringop-overflow wrong argument

2021-08-10 Thread nightstrike at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854

Bug ID: 101854
   Summary: Invalid warning -Wstringop-overflow wrong argument
   Product: gcc
   Version: 11.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: nightstrike at gmail dot com
  Target Milestone: ---

void f() {
struct Weird {
float a; // Comment out any member
float b; // to silence the warning
float c;
float d;
float e;
};
struct Weird g(float const Q[2], float const null[6][8]) {
return (struct Weird){0};
}

float const q[2];
struct Weird ss = g(q, (void *)0);
}

$ gcc -c a.c
a.c: In function 'f':
a.c:14:27: warning: 'g' accessing 192 bytes in a region of size 8
[-Wstringop-overflow=]
   14 | struct Weird ss = g(q, (void *)0);
  |   ^~~
a.c:14:27: note: referencing argument 2 of type 'const float (*)[8]'
a.c:9:22: note: in a call to function 'g'
9 | struct Weird g(float const Q[2], float const null[6][8]) {
  |  ^


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/tmp/bin/../libexec/gcc/x86_64-pc-linux-gnu/11.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../src/gcc-11.2.0/configure --disable-nls --disable-multilib
--enable-languages=all --prefix=/tmp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (GCC)

[Bug middle-end/71509] Bitfield causes load hit store with larger store than load

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71509

Andrew Pinski  changed:

   What|Removed |Added

   Assignee|rguenth at gcc dot gnu.org |pinskia at gcc dot 
gnu.org

--- Comment #14 from Andrew Pinski  ---
Taking this for GCC 13.  I am going to finally submit the bit-field lowering
next year.

[Bug middle-end/71761] missing tailcall optimization

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71761

Andrew Pinski  changed:

   What|Removed |Added

 CC||no...@turm-lahnstein.de

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

[Bug middle-end/91515] missed optimization: no tailcall for types of class MEMORY

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91515

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Andrew Pinski  ---
Yes this is a dup of bug 71761.

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

[Bug middle-end/71761] missing tailcall optimization

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71761

Andrew Pinski  changed:

   What|Removed |Added

 Target||x86_64-linux-gnu
  Component|tree-optimization   |middle-end

--- Comment #7 from Andrew Pinski  ---
The gimple level can figure out it is a tail call, it is the middle-end which
is then rejecting it as such.

[Bug tree-optimization/48363] Recursion not converted into a loop

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48363

Andrew Pinski  changed:

   What|Removed |Added

  Component|middle-end  |tree-optimization
   Last reconfirmed|2011-03-30 15:01:37 |2021-8-10
   Severity|normal  |enhancement

[Bug tree-optimization/90693] Missing popcount simplifications

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90693

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
   Keywords||missed-optimization
  Component|middle-end  |tree-optimization

[Bug tree-optimization/95060] vfnmsub132ps is not generated with -ffast-math

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95060

Andrew Pinski  changed:

   What|Removed |Added

 CC||zamazan4ik at tut dot by

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

[Bug middle-end/91250] Missed optimization: is not used vfnmsub213ss

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91250

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
   Target Milestone|--- |11.0
 Status|NEW |RESOLVED

--- Comment #4 from Andrew Pinski  ---
This is a dup of bug 95060 which is fixed for GCC 11+.

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

[Bug tree-optimization/88487] union prevents autovectorization

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88487

Andrew Pinski  changed:

   What|Removed |Added

  Component|middle-end  |tree-optimization
 Blocks||53947
   Severity|normal  |enhancement
   Keywords||alias


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations

[Bug tree-optimization/88490] Missed autovectorization when indices are different

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88490

Andrew Pinski  changed:

   What|Removed |Added

  Component|middle-end  |tree-optimization
   Keywords||missed-optimization
   Severity|normal  |enhancement

[Bug middle-end/58624] gcc internal compiler error: Segmentaion fault in insert_to_assembler_name_hash

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58624

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.0
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #18 from Andrew Pinski  ---
(In reply to Jason Merrill from comment #8)
> (In reply to Markus Trippelsdorf from comment #7)
> > static __typeof 0 a __attribute__ ((__weakref__ ("")));
> > template  class A
> > {
> >   static __thread int b;
> > };
> 
> The problem with this testcase is that set_decl_tls_model adds A::b, an
> uninstantiated template, to the symbol table.  This ICE was introduced by
> honza's r211689.
> 
> I'll deal with the other testcase.

which seems like was fixed with r6-1888:
@@ -2523,8 +2523,12 @@ duplicate_decls (tree newdecl, tree olddecl, bool
newdecl_is_friend)
}

   if (VAR_P (newdecl)
- && DECL_THREAD_LOCAL_P (newdecl))
-   set_decl_tls_model (olddecl, DECL_TLS_MODEL (newdecl));
+ && CP_DECL_THREAD_LOCAL_P (newdecl))
+   {
+ CP_DECL_THREAD_LOCAL_P (olddecl) = true;
+ if (!processing_template_decl)
+   set_decl_tls_model (olddecl, DECL_TLS_MODEL (newdecl));
+   }
 }

[Bug tree-optimization/87886] ICE in format_helper, at real.h:227

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87886

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2018-11-05 00:00:00 |2021-8-10
  Component|middle-end  |tree-optimization

--- Comment #6 from Andrew Pinski  ---
Still ICEs on the trunk.

[Bug middle-end/85637] Unneeded store of member variables in inner loop

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85637

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|UNCONFIRMED |RESOLVED

--- Comment #6 from Andrew Pinski  ---
Invalid as explained. Using local (auto) variables (non-references) can improve
the code to what you want it to be.

[Bug middle-end/49106] static variable is optimized away even though it is referenced by a nested constructor

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49106

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |7.0
 Status|NEW |RESOLVED
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=77555
 Resolution|--- |FIXED

--- Comment #2 from Andrew Pinski  ---
Fixed in GCC 7+.

[Bug target/66960] Add interrupt attribute to x86 backend

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66960

Andrew Pinski  changed:

   What|Removed |Added

 CC||christian.gnu at juner dot de

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

[Bug target/50187] Interrupt handler attribute for x86/x86_64

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50187

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
Dup of bug 66960 which is fixed in GCC 7+.

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

[Bug target/101849] MMA built-in dies with a verify_gimple failed error

2021-08-10 Thread bergner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101849

--- Comment #2 from Peter Bergner  ---
So it seems when we go to expand the gimple builtin, the cast of the pointer is
already stripped away:

(gdb) ps gsi_stmt(*gsi)
_1 = __builtin_vsx_lxvp (0, x);

We will only will get as far as expanding the builtin if there is a cast of the
double *x pointer to a __vector_pair * pointer, so the simple fix seems to be
just to look for a non __vector_pair pointer and cast it during the expansion
to the correct __vector_pair * pointer.  Doing that fixes the ICE for me.  I'll
kick off a round of testing.

[Bug middle-end/33621] Sysgen "Make depend" fails in aicasm.c at line 320

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33621

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Andrew Pinski  ---
I can only assume this was some kind of hardware failure since there is not
enough information here to even start.  Plus it has been almost 14 years so I
really doubt the information is still there.

[Bug c/101838] sizeof of struct with array of unspecified bound folded to constant

2021-08-10 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101838

--- Comment #1 from Martin Uecker  ---

Actually, the example before might have been fixed already, but these two are
still wrong:

int bar(
struct f { int a[*]; } v,
int (*b)[sizeof(struct f)] // folded to zero
);

int foo(void)
{
int n = 0;
return sizeof(typeof(*({ n = 10; struct foo { int x[n]; } x;  })));
}

int main()
{
if (sizeof(struct foo { int x[10]; }) != foo())
__builtin_abort();

return 0;
}
~

[Bug middle-end/26831] sibcall, sibcall_value: standard names not documented.

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26831

Andrew Pinski  changed:

   What|Removed |Added

Summary|sibcall, sibcall_value, |sibcall, sibcall_value:
   |sibcall_pop,|standard names not
   |sibcall_value_pop:  |documented.
   |standard names not  |
   |documented. |

--- Comment #5 from Andrew Pinski  ---
sibcall_pop and sibcall_value_pop support was removed in r6-2941.
But the sibcall and sibcall_value are still missing.

sibcall pattern is referenced from tm.texi too:
It is not uncommon for limitations of calling conventions to prevent
tail calls to functions outside the current unit of translation, or
during PIC compilation.  The hook is used to enforce these restrictions,
as the @code{sibcall} md pattern cannot fail, or fall over to a
``normal'' call.  The criteria for successful sibling call optimization
may vary greatly between different architectures.

[Bug middle-end/21231] cmov and cstore standard names not documented.

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21231

--- Comment #2 from Andrew Pinski  ---
cstore was documented in r0-93453.
cmov is still not documented.

[Bug middle-end/101852] [meta-bug] some standard RTL names are not documented

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101852

--- Comment #4 from Andrew Pinski  ---
Here is the list from target-insns.def:
grep ^DEF_TARGET_INSN target-insns.def|awk ' { print $2 } ' | tr -d '('  | tr
-d ',' > ~/insns.txt
for x in `cat ~/insns.txt`; do  if grep -q -r $x doc ; then true; else echo $x;
fi ; done  > ~/missinginsns.txt


oacc_dim_pos
oacc_dim_size
oacc_fork
oacc_join
omp_simt_enter
omp_simt_exit
omp_simt_lane
omp_simt_last_lane
omp_simt_ordered
omp_simt_vote_any
omp_simt_xchg_bfly
omp_simt_xchg_idx

reload_load_address
sibcall_value ;; PR 26831
split_stack_prologue
split_stack_space_check

[Bug middle-end/101852] [meta-bug] some standard RTL names are not documented

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101852

--- Comment #3 from Andrew Pinski  ---
My simple grep found
storent
vec_realign_load ;;; this is PR 36396

[Bug middle-end/101852] [meta-bug] some standard RTL names are not documented

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101852

--- Comment #2 from Andrew Pinski  ---
Oh target-insns.def needs to be added to the list of auditing too.

[Bug middle-end/101852] [meta-bug] some standard RTL names are not documented

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101852

Andrew Pinski  changed:

   What|Removed |Added

Summary|[meta-bug] some optabs are  |[meta-bug] some standard
   |not documented  |RTL names are not
   ||documented

--- Comment #1 from Andrew Pinski  ---
Here is a simple way to find some which seems to be missing:
grep ^OPTAB optabs.def|awk -F',' ' { print $2 } '|awk -F '"' ' { print $2 }
'|sed 's/_*\$[a-zA-Z0-9\$]*$//' |sort|uniq > ~/optabs.txt
for x in `cat ~/optabs.txt`; do  if grep -q -r $x doc ; then true; else echo
$x; fi ; done  > ~/missing.txt



Not the best but found some:
avg$a3_ceil
avg$a3_floor
divv
smul$a3_highpart
storent
uavg$a3_ceil
uavg$a3_floor
umul$a3_highpart
vec_realign_load

[Bug c++/101853] [12 Regression] g++.dg/modules/xtreme-header-5_b.C ICE

2021-08-10 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101853

Hans-Peter Nilsson  changed:

   What|Removed |Added

   Keywords|ice-on-invalid-code |ice-on-valid-code

--- Comment #2 from Hans-Peter Nilsson  ---
(In reply to Jonathan Wakely from comment #1)
> Isn't it ice-on-valid-code?

Oops, fixed, thanks.

[Bug c++/101853] [12 Regression] g++.dg/modules/xtreme-header-5_b.C ICE

2021-08-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101853

--- Comment #1 from Jonathan Wakely  ---
Isn't it ice-on-valid-code?

[Bug c++/101853] New: [12 Regression] g++.dg/modules/xtreme-header-5_b.C ICE

2021-08-10 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101853

Bug ID: 101853
   Summary: [12 Regression] g++.dg/modules/xtreme-header-5_b.C ICE
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hp at gcc dot gnu.org
CC: nathan at acm dot org, redi at gcc dot gnu.org
  Target Milestone: ---
  Host: x86_64-linux
Target: cris-elf

With c8b024fa4b76bfd914e96dd3cecfbb6ee8e91316 (r12-2773)
the g++.dg/modules/xtreme-header-5_b.C test started to fail with an ICE for
cris-elf:

Running /X/gcc/testsuite/g++.dg/modules/modules.exp ...
...
FAIL: g++.dg/modules/xtreme-header-5_b.C -std=c++2a (internal compiler error)
FAIL: g++.dg/modules/xtreme-header-5_b.C -std=c++2a (test for excess errors)
...
with the following in g++.log (edited for brevity)

spawn -ignore SIGHUP /X/gccobj/gcc/testsuite/g++/../../xg++
-B/X/gccobj/gcc/testsuite/g++/../../
/X/gcc/gcc/testsuite/g++.dg/modules/xtreme-header-5_b.C
-fdiagnostics-plain-output -nostdinc++
-I/X/gccobj/cris-elf/libstdc++-v3/include/cris-elf
-I/X/gccobj/cris-elf/libstdc++-v3/include -I/X/gcc/libstdc++-v3/libsupc++
-I/X/gcc/libstdc++-v3/include/backward -I/X/gcc/libstdc++-v3/testsuite/util
-fmessage-length=0 -std=c++2a -pedantic-errors -Wno-long-long -fmodules-ts
-fno-module-lazy -S -isystem /X/gccobj/cris-elf/./newlib/targ-include -isystem
/X/gcc/newlib/libc/include -o xtreme-header-5_b.s
/X/gcc/gcc/testsuite/g++.dg/modules/xtreme-header-5_b.C:4:30: internal compiler
error: in add_mergeable_specialization, at cp/pt.c:30073
0x883218 add_mergeable_specialization(bool, bool, spec_entry*, tree_node*,
unsigned int)
/X/gcc/gcc/cp/pt.c:30073
0x7dc4f7 trees_in::decl_value()
/X/gcc/gcc/cp/module.cc:8081
0x7dd864 trees_in::tree_node(bool)
/X/gcc/gcc/cp/module.cc:9161
0x7e5f7b module_state::read_cluster(unsigned int)
/X/gcc/gcc/cp/module.cc:14819
0x7e633d module_state::load_section(unsigned int, binding_slot*)
/X/gcc/gcc/cp/module.cc:18090
0x7e7646 module_state::read_language(bool)
/X/gcc/gcc/cp/module.cc:18019
0x7e7864 direct_import
/X/gcc/gcc/cp/module.cc:18885
0x8603b8 cp_parser_translation_unit
/X/gcc/gcc/cp/parser.c:4925
0x8603b8 c_parse_file()
/X/gcc/gcc/cp/parser.c:46181
0x9da2a1 c_common_parse_file()
/X/gcc/gcc/c-family/c-opts.c:1223
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
compiler exited with status 1

I don't see this for other targets on gcc-testresults@ (unless you count
i586-unknown-freebsd11.4 /
https://gcc.gnu.org/pipermail/gcc-testresults/2021-August/712406.html where
about all modules test fail with ICE). Also, it looks like -save-temps doesn't
help here, so please instruct on how to help me help you with the equivalent
information.

It's unlikely that r12-2773 is the cause rather than exposing the bug, being a
libstdc++ commit. Looking at the code cp/pt.c:30073, where there's a gcc_assert
on an expected empty hash-slot IIUC, makes me think this something like hashing
on uninitialized data or a plain bad hash).

[Bug c++/101850] Initialising a struct/class variable to itself does not fail at compile time (but throws std::bad_alloc at run time, as expected)

2021-08-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101850

Jonathan Wakely  changed:

   What|Removed |Added

 Resolution|--- |FIXED
   Target Milestone|--- |11.0
 Status|UNCONFIRMED |RESOLVED

--- Comment #6 from Jonathan Wakely  ---
extern "C" char* strdup(const char*);
extern "C" void free(void*);

namespace std 
{
  struct string
  {
string() { }
string(string const& s) : data(strdup(s.data)) { }
string& operator=(string const& s) {
  free(data);
  strdup(s.data);
  return *this;
}
~string() { free(data); }

char* data = nullptr;
  };
}

class M {
  std::string s;

public:
  M(std::string t) : s(t) {}
};

int main() {
  M m = m;
}

This started to warn with r11-959 "Implement a solution for PR middle-end/10138
and PR middle-end/95136."

I think this can be considered FIXED for GCC 11.

[Bug c++/101850] Initialising a struct/class variable to itself does not fail at compile time (but throws std::bad_alloc at run time, as expected)

2021-08-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101850

Jonathan Wakely  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=18635

--- Comment #5 from Jonathan Wakely  ---
Did you read comment 1?

GCC already warns. You're using GCC 8.4.0 which is old and unsupported.

[Bug c++/101850] Initialising a struct/class variable to itself does not fail at compile time (but throws std::bad_alloc at run time, as expected)

2021-08-10 Thread prasantabehera at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101850

--- Comment #4 from Prasanta Behera  ---
FWIW clang++ does produce these warnings:

~$ cat t.cpp 
#include 

class M {
  std::string s;

public:
  M(std::string t) : s(t) {}
};

int main() {
  std::string s = s;
  M m = m;
  return 0;
}
~$ clang++ t.cpp
t.cpp:11:19: warning: variable 's' is uninitialized when used within its own
initialization [-Wuninitialized]
  std::string s = s;
  ~   ^
t.cpp:12:9: warning: variable 'm' is uninitialized when used within its own
initialization [-Wuninitialized]
  M m = m;
~   ^
2 warnings generated.
~$ clang++ --version
clang version 10.0.0-4ubuntu1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Similar warnings for g++ too will help a lot!

[Bug c++/18635] [DR 504] use of uninitialised reference accepted (without -Wuninitialized) in C++ front end

2021-08-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18635

--- Comment #21 from Jonathan Wakely  ---
Yes, the core issue is still active, so currently compilers are required to
accept the code rather than reject it as ill-formed. If that changes, we can
un-suspend this.

[Bug c++/101850] Initialising a struct/class variable to itself does not fail at compile time (but throws std::bad_alloc at run time, as expected)

2021-08-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101850

--- Comment #3 from Jonathan Wakely  ---
(In reply to Prasanta Behera from comment #0)
> Version info:
> =
> ~$ g++ --version
> g++ (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
> Copyright (C) 2018 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.
> 
> ~$ gcc --version
> gcc (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
> Copyright (C) 2018 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.
> 
> Sample Program:
> ===
> ~$ cat t.cpp
> #include 
> 
> int main() {
>   std::string s = s;
>   return 0;
> }
> 
> Problem Description:
> 
> The above program tries to initialise a string with itself which is wrong!

Yes, it's undefined behaviour.

> However g++ does not show any compile time error, but the resulting binary
> fails at run time throwing std::bad_alloc as shown below.

That's one way that undefined behaviour can manifest itself. You cannot expect
to get a compile time error for all cases of undefined behaviour, that's why
it's undefined.

> ~$ g++ t.cpp
> ~$ ./a.out
> terminate called after throwing an instance of 'std::bad_alloc'
>   what():  std::bad_alloc
> Aborted (core dumped)
> 
> gcc however shows a link time error which is slightly better.
> 
> ~$ gcc t.cpp
> /tmp/cc30YkgH.o: In function `main':
> t.cpp:(.text+0x27): undefined reference to `std::__cxx11::basic_string std::char_traits, std::allocator
> >::basic_string(std::__cxx11::basic_string,
> std::allocator > const&)'
> t.cpp:(.text+0x38): undefined reference to `std::__cxx11::basic_string std::char_traits, std::allocator >::~basic_string()'
> collect2: error: ld returned 1 exit status

No, this is just because gcc doesn't link to the C++ runtime which is needed to
use std::string. You will get the same link error for a correct program, it has
absolutely nothing to do with the bug in your code.

> I think the coding error should be caught at the compile time by g++. 

It is caught, by a warning.

In the general case, turning all such mistakes into errors is impossible:

const std::string& func(const std::string&);

std::string s = func(s);

The compiler cannot know whether func has undefined behaviour or not. It could
be defined like this, which would be OK:

const std::string& func(const std::string& /*unused*/) {
  static std::string str = "a string with static storage duration";
}

Or it could be defined like this, which would be equivalent to your example:

const std::string& func(const std::string& s) {
  return s;
}

tl;dr it is not reasonable to expect to always get a compile time error for
undefined behaviour, it's the programmer's responsibility to avoid undefined
behaviour. COmpiler warnings can help, if you enable them and pay attention to
them.

[Bug middle-end/101852] New: [meta-bug] some optabs are not documented

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101852

Bug ID: 101852
   Summary: [meta-bug] some optabs are not documented
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pinskia at gcc dot gnu.org
Depends on: 21231
  Target Milestone: ---

There are a few optabs that seems to be missing documentation.
Linked are those bugs.
Someone should do an audit of optabs.def and doc/md.texi to see what optabs are
also missing.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21231
[Bug 21231] cmov and cstore standard names not documented.

[Bug other/88141] Issues with texinfo when building GCC r266351 in MSYS2

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88141

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |WORKSFORME
 Status|UNCONFIRMED |RESOLVED

--- Comment #6 from Andrew Pinski  ---
A mishandled git checkout so closing as worksforme.

[Bug other/67320] Incorrect standard names for wide addition

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67320

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
   Target Milestone|--- |6.0
 Status|UNCONFIRMED |RESOLVED

--- Comment #2 from Andrew Pinski  ---
OPTAB_D (ssum_widen_optab, "widen_ssum$I$a3")

Fixed in r6-3048.

[Bug middle-end/56472] vcondu undocumented

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56472

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
   Target Milestone|--- |6.0
 Status|UNCONFIRMED |RESOLVED

--- Comment #1 from Andrew Pinski  ---
Fixed in r6-4835.

[Bug other/40817] TARGET_VALID_OPTION_ATTRIBUTE_P vs. TARGET_OPTION_VALID_ATTRIBUTE_P

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40817

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |4.6.0

--- Comment #1 from Andrew Pinski  ---
Fixed in r0-101259.

[Bug go/101851] New: gccgo crashes compiling `x, y := int(0)`

2021-08-10 Thread rupert.tombs at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101851

Bug ID: 101851
   Summary: gccgo crashes compiling `x, y := int(0)`
   Product: gcc
   Version: 11.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: go
  Assignee: ian at airs dot com
  Reporter: rupert.tombs at gmail dot com
CC: cmang at google dot com
  Target Milestone: ---

Full reproduction: https://go.godbolt.org/z/39MnE5GEn

This source crashes gccgo:

```
package main

func main() {
x, y := int(0)
_, _ = x, y
}
```

apparently due to the incorrect short declaration; 
gc reports "assignment mismatch: 2 variables but 1 value".


Full details:

```
Using built-in specs.
COLLECT_GCC=/opt/compiler-explorer/gcc-11.2.0/bin/gccgo
Target: x86_64-linux-gnu
Configured with: ../gcc-11.2.0/configure
--prefix=/opt/compiler-explorer/gcc-build/staging --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu --disable-bootstrap
--enable-multiarch --with-abi=m64 --with-multilib-list=m32,m64,mx32
--enable-multilib --enable-clocale=gnu
--enable-languages=c,c++,fortran,ada,go,d --enable-ld=yes --enable-gold=yes
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-linker-build-id
--enable-lto --enable-plugins --enable-threads=posix
--with-pkgversion=Compiler-Explorer-Build-gcc--binutils-2.36.1
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (Compiler-Explorer-Build-gcc--binutils-2.36.1) 
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-g' '-o' '/app/output.s'
'-masm=intel' '-S' '-v' '-save-temps' '-shared-libgcc' '-mtune=generic'
'-march=x86-64' '-dumpdir' '/app/'

/opt/compiler-explorer/gcc-11.2.0/bin/../libexec/gcc/x86_64-linux-gnu/11.2.0/go1
 -quiet -dumpdir /app/ -dumpbase output.go -dumpbase-ext .go
-masm=intel -mtune=generic -march=x86-64 -g -version -fdiagnostics-color=always
-o /app/output.s
-L/opt/compiler-explorer/gcc-11.2.0/bin/../lib/gcc/x86_64-linux-gnu/11.2.0
-L/opt/compiler-explorer/gcc-11.2.0/bin/../lib/gcc/x86_64-linux-gnu
-L/opt/compiler-explorer/gcc-11.2.0/bin/../lib/gcc
-L/opt/compiler-explorer/gcc-11.2.0/bin/../lib/gcc/x86_64-linux-gnu/11.2.0/../../../../lib64
-L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu
-L/usr/lib/../lib64 -L/usr/lib/x86_64-linux-gnu
-L/opt/compiler-explorer/gcc-11.2.0/bin/../lib/gcc/x86_64-linux-gnu/11.2.0/../../../../x86_64-linux-gnu/lib
-L/opt/compiler-explorer/gcc-11.2.0/bin/../lib/gcc/x86_64-linux-gnu/11.2.0/../../..
GNU Go (Compiler-Explorer-Build-gcc--binutils-2.36.1) version 11.2.0
(x86_64-linux-gnu)
compiled by GNU C version 7.5.0, GMP version 6.1.0, MPFR version 3.1.6,
MPC version 1.0.3, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Go (Compiler-Explorer-Build-gcc--binutils-2.36.1) version 11.2.0
(x86_64-linux-gnu)
compiled by GNU C version 7.5.0, GMP version 6.1.0, MPFR version 3.1.6,
MPC version 1.0.3, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
```

All compilation options
```
-g -o /tmp/compiler-explorer-compiler2021710-5217-aatpg5.psufb/output.s
-masm=intel -S -fdiagnostics-color=always -v -save-temps
/tmp/compiler-explorer-compiler2021710-5217-aatpg5.psufb/example.go
```

Full backtrace:
```
go1: internal compiler error: in do_flatten, at go/gofrontend/statements.cc:323
0x16b2bf9 internal_error(char const*, ...)
???:0
0x6e5266 fancy_abort(char const*, int, char const*)
???:0
0x7a1700 Variable_declaration_statement::do_flatten(Gogo*, Named_object*,
Block*, Statement_inserter*)
???:0
0x7508fc Flatten::statement(Block*, unsigned long*, Statement*)
???:0
0x7a4014 Statement::traverse(Block*, unsigned long*, Traverse*)
???:0
0x75451d Block::traverse(Traverse*)
???:0
0x754799 Function::traverse(Traverse*)
???:0
0x7547f0 Flatten::function(Named_object*)
???:0
0x75939b Bindings::traverse(Traverse*, bool)
???:0
0x759541 Gogo::traverse(Traverse*)
???:0
0x759b28 Gogo::flatten()
???:0
0x74f12f go_parse_input_files(char const**, unsigned int, bool, bool)
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
```

Thank you for maintaining gccgo!

[Bug fortran/101841] Wrong realloc-lhs warning with matmul and -O2

2021-08-10 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101841

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Priority|P3  |P4
   Last reconfirmed||2021-08-10

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

The warning disappears when frontend-optimization is disabled
(i.e. use -fno-frontend-optimize).

The warning also disappears if you disable the generation of inline
code for matmul by specifying -finline-matmul-limit=0 .

[Bug middle-end/36396] standard md pattern vec_realign_load_M and REALIGN_LOAD_EXPR tree are not documented

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36396

Andrew Pinski  changed:

   What|Removed |Added

Summary|standard md pattern |standard md pattern
   |vec_realign_load_M isn't|vec_realign_load_M and
   |documented  |REALIGN_LOAD_EXPR tree are
   ||not documented
   Last reconfirmed|2008-12-28 01:47:22 |2021-8-10

--- Comment #2 from Andrew Pinski  ---
OPTAB_D (vec_realign_load_optab, "vec_realign_load_$a")


REALIGN_STORE_EXPR was removed not far after being added.


These were added back in r0-61921.

[Bug c++/101850] Initialising a struct/class variable to itself does not fail at compile time (but throws std::bad_alloc at run time, as expected)

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101850

Andrew Pinski  changed:

   What|Removed |Added

 Depends on||48829

--- Comment #2 from Andrew Pinski  ---
See PR 48829 also.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48829
[Bug 48829] g++ no warning initializing a variable using itself

[Bug c++/101850] Initialising a struct/class variable to itself does not fail at compile time (but throws std::bad_alloc at run time, as expected)

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101850

--- Comment #1 from Andrew Pinski  ---
In GCC 11+ we start to warn about this code with -W -Wall:
: In function 'int main()':
:5:19: warning: 's' may be used uninitialized [-Wmaybe-uninitialized]
5 |   std::string s = s;
  |   ^

[Bug c++/52770] RFE: Letting compiler know asm block can call function that can throw

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52770

Andrew Pinski  changed:

   What|Removed |Added

 CC||sagebar at web dot de

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

[Bug tree-optimization/94357] Inline assembly with memory operand is considered nothrow with `-fnon-call-exceptions`

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94357

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
Dup of bug 52770.

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

[Bug tree-optimization/55912] missing optimization of x/x and x/std::abs(x)

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55912

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
   Keywords||missed-optimization

[Bug c++/101850] New: Initialising a std::string variable to itself does not fail at compile time, but throws std::bad_alloc at run time

2021-08-10 Thread prasantabehera at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101850

Bug ID: 101850
   Summary: Initialising a std::string variable to itself does not
fail at compile time, but throws std::bad_alloc at run
time
   Product: gcc
   Version: 8.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: prasantabehera at hotmail dot com
  Target Milestone: ---

Version info:
=
~$ g++ --version
g++ (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
Copyright (C) 2018 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.

~$ gcc --version
gcc (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
Copyright (C) 2018 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.

Sample Program:
===
~$ cat t.cpp
#include 

int main() {
  std::string s = s;
  return 0;
}

Problem Description:

The above program tries to initialise a string with itself which is wrong!
However g++ does not show any compile time error, but the resulting binary
fails at run time throwing std::bad_alloc as shown below.

~$ g++ t.cpp
~$ ./a.out
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)

gcc however shows a link time error which is slightly better.

~$ gcc t.cpp
/tmp/cc30YkgH.o: In function `main':
t.cpp:(.text+0x27): undefined reference to `std::__cxx11::basic_string, std::allocator
>::basic_string(std::__cxx11::basic_string,
std::allocator > const&)'
t.cpp:(.text+0x38): undefined reference to `std::__cxx11::basic_string, std::allocator >::~basic_string()'
collect2: error: ld returned 1 exit status

I think the coding error should be caught at the compile time by g++. 

Also, the problem is same with any generic C++ class/struct:

#include 

struct M {
  std::string s;
};

int main() {
  // std::string s = s;
  M m = m;
  return 0;
}

Also checked with g++ version 7.5.0, to see the same behavior.

[Bug tree-optimization/91965] missing simplification for (C - a) << N

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91965

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
   Last reconfirmed|2019-10-04 00:00:00 |2021-8-10

--- Comment #4 from Andrew Pinski  ---
Note I noticed clang does not vectorize bar because they convert (1048575 - a)
<< 44 to (a * -17592186044416ull) -17592186044416.

So right now at least we vectorize the loop.

[Bug tree-optimization/86050] Inline break tail-call optimization

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86050

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |10.0

--- Comment #9 from Andrew Pinski  ---
In the case of removing the noinline, GCC 10+ is able to tail call this
function just fine and we don't get an overall stack increase.

[Bug tree-optimization/90571] Missed optimization opportunity when returning function pointers based on run-time boolean

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90571

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2019-05-22 00:00:00 |2021-8-10
   Severity|normal  |enhancement

[Bug tree-optimization/90106] builtin sqrt() ignoring libm's sqrt call result

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90106

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
   Target Milestone|--- |10.0

--- Comment #22 from Andrew Pinski  ---
Fixed so closing as such.

[Bug tree-optimization/68027] uncprop should work on more than PHI nodes

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68027

--- Comment #6 from Andrew Pinski  ---
(In reply to SztfG from comment #4)
> I think this can be optimized in this way:
> 
> cmpl$100, %edi
> jg  a1
> jne a2
> jmp a3

Note that is a different bug and should be filed seperately.  Something about
conditional tail calls.  I thought there was a bug filed for that case but I
can't seem to find it.

[Bug tree-optimization/68027] uncprop should work on more than PHI nodes

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68027

Andrew Pinski  changed:

   What|Removed |Added

Summary|conditional statement and   |uncprop should work on more
   |unnecessary register|than PHI nodes
   |assignment  |
   Severity|normal  |enhancement

--- Comment #5 from Andrew Pinski  ---
tree-ssa-uncprop.c does some of this but only handles PHI nodes currrently.
Note ICC and MSVC generate the code without the move while GCC and clang both
do the move.

[Bug tree-optimization/85720] bad codegen for looped assignment of primitives at -O2

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85720

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

--- Comment #8 from Andrew Pinski  ---
(In reply to Mathias Stearn from comment #2)
> Hmm. Taking the example from the -ftree-loop-distribute-patterns
> documentation, it still seems to generate poor code, this time at both -O2
> and -O3: https://godbolt.org/g/EsQDj8
> 
> Why isn't that transformed to memset(A, 0, N); memset(B, 1, N); ? This feels
> similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85721. Should I make
> a new ticket with this example?

For this case (with the mentioned B[i] = A[i] + 1 fix), in GCC 10+ we started
to produce memset for one of the alias conditions.
-ftree-loop-distribute-patterns is turned on at -O2 for starting in GCC 10
also.

I should note clang, ICC nor MSVC is able to do this second loop to convert it
to two memset even with an alias check; others just vectorize the loop with an
aliasing check. clang and MSVC are able to detect the one in comment #0 and
convert it to memset though so I know they have this kind of optimization for
sure.

[Bug tree-optimization/85697] At -Os nontrivial ctor does not use SSE to zero

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85697

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2018-05-09 00:00:00 |2021-8-10
   Severity|normal  |enhancement

--- Comment #3 from Andrew Pinski  ---
Note the testcase needs a slight update to it:
__attribute__((noinline, noipa)) void UseA (A& a) { a.a=1; }

Note you need the noipa because GCC figures out that only writes to a.a and
later on only accesses a.a so it deletes the other writes :).

Turning SLP on at -O2/-Os would be something to look into.

[Bug tree-optimization/46957] http://blog.regehr.org/archives/320 Example 1

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46957

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
   Last reconfirmed|2018-04-22 00:00:00 |2021-8-10

[Bug tree-optimization/46236] Local aggregate not eliminated

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46236

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
   Last reconfirmed|2018-04-22 00:00:00 |2021-8-10

[Bug target/101849] MMA built-in dies with a verify_gimple failed error

2021-08-10 Thread bergner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101849

Peter Bergner  changed:

   What|Removed |Added

   Host||powerpc64*-linux-gnu
   Target Milestone|--- |12.0
  Known to fail||11.0, 12.0

[Bug target/101849] MMA built-in dies with a verify_gimple failed error

2021-08-10 Thread bergner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101849

Peter Bergner  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Assignee|unassigned at gcc dot gnu.org  |bergner at gcc dot 
gnu.org
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2021-08-10

--- Comment #1 from Peter Bergner  ---
This is a target bug with my new __builtin_vsx_lxvp built-in.  Mine.

[Bug target/101849] New: MMA built-in dies with a verify_gimple failed error

2021-08-10 Thread bergner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101849

Bug ID: 101849
   Summary: MMA built-in dies with a verify_gimple failed error
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bergner at gcc dot gnu.org
  Target Milestone: ---

bergner@pike:~/gcc/BUGS/MMA/ICE$ cat bug.i 
__vector_pair vp;
void
foo (double *x)
{
   vp = __builtin_vsx_lxvp(0, (__vector_pair *)(void *)x);
}

bergner@pike:~/gcc/BUGS/MMA/IC3$ gcc -S -O2 -mcpu=power10 bug.i 
bug.i: In function ‘foo’:
bug.i:3:1: error: non-trivial conversion in ‘mem_ref’
3 | foo (double *x)
  | ^~~
__vector_pair
double
_1 = *_2;
during GIMPLE pass: lower
bug.i:3:1: internal compiler error: ‘verify_gimple’ failed
0x114e804f verify_gimple_in_seq(gimple*)
/home/bergner/gcc/gcc-fsf-mainline/gcc/tree-cfg.c:5183
0x11188afb execute_function_todo
/home/bergner/gcc/gcc-fsf-mainline/gcc/passes.c:2044
0x111872cb do_per_function
/home/bergner/gcc/gcc-fsf-mainline/gcc/passes.c:1687
0x11188de3 execute_todo
/home/bergner/gcc/gcc-fsf-mainline/gcc/passes.c:2096
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug other/39363] [meta-bug] pending patches from ARC International (UK) Ltd

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39363
Bug 39363 depends on bug 39305, which changed state.

Bug 39305 Summary: tree-ssa-loop-ch.c:copy_loop_headers performs loop unrolling
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39305

   What|Removed |Added

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

[Bug tree-optimization/39305] tree-ssa-loop-ch.c:copy_loop_headers performs loop unrolling

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39305

Andrew Pinski  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |9.0

--- Comment #2 from Andrew Pinski  ---
A slightly different but better patch was done for GCC 9.  r9-4967 .

r9-4967 checks if the exit was an IV which is very similar to what your check
was trying to do.

[Bug c++/62207] [8 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in tsubst_copy, at cp/pt.c

2021-08-10 Thread reichelt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62207

Volker Reichelt  changed:

   What|Removed |Added

   Target Milestone|8.0 |9.0
  Known to work||9.1.0

--- Comment #13 from Volker Reichelt  ---
It's fixed in GCC 9, but not 8.

[Bug c++/95567] Defaulted virtual <=> has the wrong behavior, vtable is checked when it should not be

2021-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95567

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2020-10-28 00:00:00 |2021-8-10
Summary|Defaulted virtual <=> has   |Defaulted virtual <=> has
   |the wrong behavior  |the wrong behavior, vtable
   ||is checked when it should
   ||not be

--- Comment #2 from Andrew Pinski  ---
Right it is checking the vtable for equality.

[Bug c++/85282] CWG 727 (full specialization in non-namespace scope)

2021-08-10 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282

Patrick Palka  changed:

   What|Removed |Added

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

  1   2   >