[Bug driver/115368] Wrong order of gcc include paths on musl systems

2024-06-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115368

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2024-06-06
 Ever confirmed|0   |1

--- Comment #5 from Andrew Pinski  ---
Also how come glibc targets get it correct:
[apinski@xeond2 gcc]$ ~/upstream-gcc-match/bin/gcc -E -Wp,-v -
ignoring nonexistent directory
"/home/apinski/upstream-gcc-match/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/apinski/upstream-gcc-match/lib/gcc/x86_64-pc-linux-gnu/15.0.0/include
 /usr/local/include
 /home/apinski/upstream-gcc-match/include

/home/apinski/upstream-gcc-match/lib/gcc/x86_64-pc-linux-gnu/15.0.0/include-fixed
 /usr/include

[Bug driver/115368] Wrong order of gcc include paths on musl systems

2024-06-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115368

--- Comment #4 from Andrew Pinski  ---
Note this patch does not work as OPTION_MUSL is not defined for all targets.
e.g. *-*-darwin and *-*-elf* targets do not define it.

[Bug plugins/115288] [15 Regression] File label-text.h not part of installation since r15-874-g9bda2c4c81b668

2024-06-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115288

Andrew Pinski  changed:

   What|Removed |Added

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

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

[Bug c++/109896] Missed optimisation: overflow detection in multiplication instructions for operator new

2024-06-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109896

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-06-06
 Status|UNCONFIRMED |ASSIGNED
  Component|target  |c++
 CC||pinskia at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #8 from Andrew Pinski  ---
Confirmed. Let me see if I can optimize this better ...

[Bug tree-optimization/79201] missed optimization: sinking doesn't handle calls, swap PRE and sinking

2024-06-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79201

--- Comment #8 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #6)
> here is a testcase where DOM does not mess with the loop but we should still
> be able to sink the function out and do when adding  -fno-tree-pre:
> 
> int f(int n, int t) {
>   int i,j=0;
>   if (t >=31 || t < 0)  return 100;
> 
>   for (i = 0; i < t; i++) {
> j = __builtin_ffs(i);
>   }
>   return j;
> }

Note in GCC 12+, you need  -fno-tree-vectorize to get the bad behavior back.

[Bug tree-optimization/115366] Missing optimzation: fold `(bool)(a<< boolvalue)` to `(bool)(a)`

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115366

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
Summary|Missing optimzation: fold   |Missing optimzation: fold
   |`return (bool)(((a / 8) *   |`(bool)(a<< boolvalue)` to
   |4) << f)` to `return|`(bool)(a)`
   |(bool)(a / 8)`  |
   Last reconfirmed||2024-06-06
   Severity|normal  |enhancement
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
The missed optimization here is really just:
```
bool fn1(unsigned short a, bool f) {
return a << f != 0; // equals to return a / 8;
}
```
is not optimized to:
```
bool fn1(unsigned short a, bool f) {
return a != 0; // equals to return a / 8;
}
```

Since `((int)a) << [0,1] != 0` is the same as `((int)a) != 0`.

After that, GCC already has the rest.

[Bug tree-optimization/98909] Failure to optimize odd loop pattern

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98909

--- Comment #3 from Andrew Pinski  ---
Note this is very similar to PR 112104, in that `~a` can be treated as `a ^
-1`.

[Bug c++/115364] [11/12/13/14/15 Regression] ICE-on-invalid when calling non-const template member on const object

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115364

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |11.5
Summary|ICE-on-invalid when calling |[11/12/13/14/15 Regression]
   |non-const template member   |ICE-on-invalid when calling
   |on const object |non-const template member
   ||on const object
   Last reconfirmed||2024-06-05
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Keywords||diagnostic, error-recovery,
   ||ice-checking

--- Comment #1 from Andrew Pinski  ---
>Probably because it's just a tree check; from what I've heard, they 

Yes it does not show up with release checking set so most folks won't see the
ICE in this case and it is only trying to find the location of the argument
which in this case it is this which does not really have a location.

Anyways confirmed, 99% sure it was introduced by r8-3378-g9003adc732305c .

[Bug tree-optimization/115363] New: Missing loop vectorization due to loop bound load not being pulled out

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115363

Bug ID: 115363
   Summary: Missing loop vectorization due to loop bound load not
being pulled out
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: enhancement
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
struct out {
  unsigned *array;
};

struct m{
  void f(out *output);
  void f1(out *output);
  int size;
};

void  m::f(out *output)
{
  for (int k = 0; k < size; k++) {
output->array[k] += 1;
  }
}

void  m::f1(out *output)
{
  int tmp = size;
  for (int k = 0; k < size; k++) {
output->array[k] += 1;
  }
}
```

We should be able to vectorize `m::f` but currently does not since this->size
might alias array[k].
But we could version the loop to pull out the this->size out of the loop and we
could vectorize the loop then.

[Bug tree-optimization/54013] Loop with control flow not vectorized

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54013

--- Comment #3 from Andrew Pinski  ---
I think for SVE(2?) this could be vectorized using the fault first case.

[Bug tree-optimization/115362] fixed_size_simd dot product recognition not working for stdx::reduce

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115362

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization
  Component|c++ |tree-optimization

--- Comment #2 from Andrew Pinski  ---
Can you provide a full compilable testcase?

[Bug target/115355] [12/13/14/15 Regression] PPCLE: Auto-vectorization creates wrong code for Power9

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115355

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |12.4
Summary|PPCLE: Auto-vectorization   |[12/13/14/15 Regression]
   |creates wrong code for  |PPCLE: Auto-vectorization
   |Power9  |creates wrong code for
   ||Power9

[Bug c++/115361] "possibly dangling reference to a temporary" when object is_empty

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115361

--- Comment #1 from Andrew Pinski  ---
GetKey() is the temporary in all cases.

[Bug c++/115356] a reference to a non-constant integer expression can be used as non-type template argument inside requires expression

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115356

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-06-05
 Ever confirmed|0   |1
Summary|not a constant expression   |a reference to a
   |can be used as non-type |non-constant integer
   |template argument inside|expression can be used as
   |requires expression |non-type template argument
   ||inside requires expression
   Keywords||accepts-invalid
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
A const reference has the same issue as rvalue reference.

Confirmed.

[Bug testsuite/111658] test-function-bodies fails to find functions with single-letter names

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111658

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
Fixed by r15-1035-gacdc9df371fbe99e814a3f35a439531e08af79e7
(https://gcc.gnu.org/pipermail/gcc-cvs/2024-June/403789.html).

[Bug c++/115358] [13/14/15 Regression] template argument deduction/substitution failed in generic lambda function

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115358

--- Comment #5 from Andrew Pinski  ---
Note this is not related to NSDMI nor related to use of STR in a non-complete
type context as shown by:
```
template 
void foo(const int ()[N]) {}

template 
struct Bar
{
static constexpr int STR[] = {1,2,3};
Bar();
};

template
Bar::Bar()
{
[](auto){
foo(STR);
   };
}

int main()
{
Bar{};
}
```

[Bug c++/115358] [13/14/15 Regression] template argument deduction/substitution failed in generic lambda function

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115358

Andrew Pinski  changed:

   What|Removed |Added

Summary|template argument   |[13/14/15 Regression]
   |deduction/substitution  |template argument
   |failed in generic lambda|deduction/substitution
   |function|failed in generic lambda
   ||function
   Last reconfirmed||2024-06-05
   Keywords||needs-bisection,
   ||rejects-valid
 Ever confirmed|0   |1
   Target Milestone|--- |13.4
 Status|UNCONFIRMED |NEW

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

[Bug middle-end/115352] wrong code with _BitInt() __builtin_sub_overflow_p() at -O0

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115352

Andrew Pinski  changed:

   What|Removed |Added

  Component|tree-optimization   |middle-end
 Target|x86_64-pc-linux-gnu |x86_64-pc-linux-gnu
   ||aarch64-linux-gnu
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2024-06-05
   Host|x86_64-pc-linux-gnu |

--- Comment #1 from Andrew Pinski  ---
Reducing it down to `128*300` works but `128*400` fails. The gimple level
difference between 128*300 vs 128*400 is just the argument that gets passed.
So I don't think the bug is __builtin_sub_overflow_p  expansion but I could be
wrong.

Note clang is very useless at testing this since it unrolls the loop always.
(that is after changing __builtin_sub_overflow_p to __builtin_sub_overflow:

  _BitInt (65) t;
  return __builtin_sub_overflow (0, b, );

)


It also fails on aarch64-linux-gnu.

[Bug tree-optimization/115350] Missing optimzation: fold `n = std::min(f ? 0 : 3, -a)` to `n = -a`

2024-06-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115350

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
  Component|c++ |tree-optimization

--- Comment #2 from Andrew Pinski  ---
Note also disabling evrp (-fdisable-tree-evrp) GCC is able to optimize both ...

[Bug c++/115350] Missing optimzation: fold `n = std::min(f ? 0 : 3, -a)` to `n = -a`

2024-06-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115350

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2024-06-05
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
What is more interesting is the order of evulation of the function arguments
make a huge difference.
Testcase:
```
unsigned short n;
#include 
void fn1( unsigned short f, unsigned char a) {
auto t1 = -a;
auto t = f ? 0 : 3;
n = std::min(t, t1); // equals to "n = -a"
}
void fn2( unsigned short f, unsigned char a) {
auto t = f ? 0 : 3;
auto t1 = -a;
n = std::min(t, t1); // equals to "n = -a"
}
```

fn2 works while f1 does not.

fn2 used to be only optimized at the rtl level too ..

[Bug c++/58661] Definition of inherited nested class should be invalid

2024-06-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58661

--- Comment #1 from Andrew Pinski  ---
Just for reference this was defect #347 which was closed as not a defect due to
other changes (defect report #284)
https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#347

https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#284

[Bug c++/115338] Missing -Wpedantic warning for class-specifier for nested type in class scope.

2024-06-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115338

--- Comment #1 from Andrew Pinski  ---
MSVC and GCC accepts it.
EDG and clang rejects it.

[Bug tree-optimization/115347] [12/13/14/15 Regression] wrong code at -O3 on x86_64-linux-gnu

2024-06-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115347

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||needs-bisection
   Last reconfirmed||2024-06-04
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

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

[Bug tree-optimization/115347] [12/13/14/15 Regression] wrong code at -O3 on x86_64-linux-gnu

2024-06-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115347

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||wrong-code
Summary|wrong code at -O3 on|[12/13/14/15 Regression]
   |x86_64-linux-gnu|wrong code at -O3 on
   ||x86_64-linux-gnu
   Target Milestone|--- |12.4

[Bug c++/115343] Member name lookup does not consider equivalent type aliases from different base classes to be equivalent.

2024-06-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115343

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
MSVC rejects the code:

(15): error C2385: ambiguous access of 'tag1'
(15): note: could be the 'tag1' in base 'foo'
(15): note: or could be the 'tag1' in base 'bar'

So does EDG:

"", line 15: error: "foobar::tag1" is ambiguous
  foobar::tag1 _;
  ^

1 error detected in the compilation of "".


Which makes this me 99% sure this is a clang issue.

[Bug c++/115343] Member name lookup does not consider equivalent type aliases from different base classes to be equivalent.

2024-06-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115343

--- Comment #1 from Andrew Pinski  ---
Note the original example is invalid code to begin.
```
:5:11: warning: declaration of 'using foo::tag = struct tag' changes
meaning of 'tag' [-Wchanges-meaning]
5 | using tag = tag;
  |   ^~~
:5:17: note: used here to mean 'struct tag'
5 | using tag = tag;
  | ^~~
:2:8: note: declared here
2 | struct tag { };
  |^~~
```


But a simple change to the source:
```
struct tag { };

struct foo {
using tag1 = tag;
};

struct bar { 
using tag1 = tag;
};

struct foobar : foo, bar { };

int main() {
foobar::tag1 _;
}
```

Gets the questionable ambiguous error message without a warning.

[Bug tree-optimization/115344] Missing loop counter reversal

2024-06-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115344

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug middle-end/115346] [15] Volatile load elimination with packed struct bitfields

2024-06-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115346

--- Comment #3 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #2)
> Note this is not even emitted at -O0, the gimplifier removes it for some
> reason ...

Oh see PR 99258 for analysis of the gimplifier (I think). with `#pragma
pack(1)`, the struct becomes BLKmode.

[Bug middle-end/115346] [15] Volatile load elimination with packed struct bitfields

2024-06-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115346

--- Comment #2 from Andrew Pinski  ---
Note this is not even emitted at -O0, the gimplifier removes it for some reason
...

[Bug middle-end/115346] [15] Volatile load elimination with packed struct bitfields

2024-06-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115346

--- Comment #1 from Andrew Pinski  ---
>GCC 4.0.4 does not eliminate the loads: https://godbolt.org/z/frsP8o7YT

But 3.4.6 did not emit them either.

[Bug middle-end/115345] [12/13/14/15 Regression] Different outputs compared to GCC 11- and MSVC/Clang

2024-06-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115345

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||wrong-code

--- Comment #7 from Andrew Pinski  ---
A few questions, does `-fsanitize=undefined -fsanitize=address` report
anything? Does it work at -O0 and not just -O3? Does adding
-fno-strict-aliasing to the command line "fix" the crash? Are there any
warnings with `-Wextra -Wall` that might be causing an issue?

[Bug tree-optimization/115337] wrong code with _BitInt() __builtin_stdc_first_leading_one/__builtin_clzg (with -1 as second arg) at -O2

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115337

--- Comment #2 from Andrew Pinski  ---
Looks like the code in `cfn_clz::fold_range` in gimple-range-op.cc assume that
the return value for defining of 0 should only be positive.

`cfn_ctz::fold_range` has a similar issue too.

As a seperate note I notice:
```
// Implement range operator for CFN_BUILT_IN_POPCOUNT.
class cfn_popcount : public cfn_ffs

```
That seems wrong, popcount is not related to ffs (ffs is more related to
clz/ctz).

[Bug tree-optimization/115337] wrong code with _BitInt() __builtin_stdc_first_leading_one() at -O2

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115337

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 CC||aldyh at gcc dot gnu.org,
   ||pinskia at gcc dot gnu.org
 Ever confirmed|0   |1
   Last reconfirmed||2024-06-04

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

  # RANGE [irange] int [0, +INF]
  _1 = .CLZ (_2, -1);

Is WRONG in evrp. The range is [-1, +INF].

Reduced testcase:
```
[[gnu::noinline]]
int
foo (unsigned _BitInt (129) z)
{
  int t = __builtin_stdc_first_leading_one (z);
  return t == 0;
}

int main()
{
  if (! foo(0))
__builtin_abort();
}
```

[Bug c++/115331] [13/14/15 Regression] ICE-on-invalid passing a typoed lambda to a list-initializer

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115331

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-06-03
Summary|ICE-on-invalid passing a|[13/14/15 Regression]
   |typoed lambda to a  |ICE-on-invalid passing a
   |list-initializer|typoed lambda to a
   ||list-initializer
   Target Milestone|--- |13.4
 Status|UNCONFIRMED |NEW
   Keywords||error-recovery,
   ||ice-checking
 Ever confirmed|0   |1
Version|unknown |15.0

--- Comment #2 from Andrew Pinski  ---
I suspect it was r13-3527-gf7d1dbb86a .


+  if (parm == error_mark_node)
+   continue;
+  parm = TREE_VALUE (parm);
+
+  if (DECL_VIRTUAL_P (parm))
+   // A synthetic parm, we're done.
+   break;



The check for parm being error_mark_node should also happen on TREE_VALUE
(param).

[Bug c++/115331] ICE-on-invalid passing a typoed lambda to a list-initializer

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115331

Andrew Pinski  changed:

   What|Removed |Added

Summary|[15 regression] |ICE-on-invalid passing a
   |ICE-on-invalid passing a|typoed lambda to a
   |typoed lambda to a  |list-initializer
   |list-initializer|

--- Comment #1 from Andrew Pinski  ---
>The ICE does not reproduce on 14.1, it's trunk only 

That is most likely because the trunk has checking turned on by default. So
removing the regression marker until proven otherwise.

[Bug target/115321] [15 regression] ICE when building grub (extract_insn, at recog.cc:2812) since r15-930

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115321

Andrew Pinski  changed:

   What|Removed |Added

 CC||jamborm at gcc dot gnu.org

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

[Bug target/115329] [15 Regression] ICE in extract_insn, at recog.cc:2812 since r15-930-ge715204f203d31

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115329

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
A few minutes too slow, it was just fixed in the last hour. Anyways it is a dup
of bug 115321.

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

[Bug middle-end/108789] __builtin_(add|mul|sub)_overflow methods generate duplicate operations if both operands are const which in turn causes wrong code due to overlapping arguments

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108789

--- Comment #4 from Andrew Pinski  ---
Note the missing SAVE_EXPR issue is similar to PR 52339 (which has a patch
attached to it that would fix the issue here too I think).

[Bug middle-end/108789] __builtin_(add|mul)_overflow methods generate duplicate operations if both operands are const which in turn causes wrong code due to overlapping arguments

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108789

Andrew Pinski  changed:

   What|Removed |Added

 CC||cody at tapscott dot me

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

[Bug c/115326] __builtin_sub_overflow reports incorrect overflow value

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115326

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #3 from Andrew Pinski  ---
(In reply to Jakub Jelinek from comment #2)
> I think this is just invalid testcase.
> The compiler is told that *a is const, but it is changed through a different
> lvalue.

No the testcase is valid, it is just a dup of bug 108789.

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

[Bug target/115325] RVV vmulh and vmulhu unknown without -march, but vmul is known

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115325

--- Comment #1 from Andrew Pinski  ---
The correct way of doing this is to use `pragma GCC target` but that is not
supported on riscv yet ...

[Bug sanitizer/115323] [10/11/12 Regression] signed integer overflow check missing at -O0, -O2, -O3, -Os

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115323

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #3 from Andrew Pinski  ---
This is not a regression as it has always been a bug, it was only fixed in GCC
13+. Dup of bug 108256.

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

[Bug sanitizer/108256] Missing integer overflow instrumentation when assignment LHS is narrow

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108256

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

[Bug target/115322] SPEC2006 403.gcc internal error

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115322

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
  Component|c   |target
   Last reconfirmed||2024-06-03
 Target||riscv
 Status|UNCONFIRMED |WAITING

--- Comment #1 from Andrew Pinski  ---
Does adding -fno-strict-aliasing help?

[Bug target/115321] [15 regression] ICE when building grub (extract_insn, at recog.cc:2812) since r15-930

2024-06-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115321

Andrew Pinski  changed:

   What|Removed |Added

Summary|[15 regression] ICE when|[15 regression] ICE when
   |building grub   |building grub
   |(extract_insn, at   |(extract_insn, at
   |recog.cc:2812)  |recog.cc:2812) since
   ||r15-930
Version|unknown |15.0
   Target Milestone|--- |15.0

--- Comment #1 from Andrew Pinski  ---
I am 99.99% sure this was introduced by r15-930-ge715204f203d31 .

[Bug tree-optimization/56576] wrong code for aliased union at -O3

2024-06-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56576

Andrew Pinski  changed:

   What|Removed |Added

 CC||msl023508 at gmail dot com

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

[Bug middle-end/93298] GCC 10.0 non-current union member access

2024-06-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93298

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|INVALID |DUPLICATE

--- Comment #3 from Andrew Pinski  ---
Dup of bug 56576 and others.

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

[Bug tree-optimization/56576] wrong code for aliased union at -O3

2024-06-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56576

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

[Bug tree-optimization/56577] wrong code for aliased union on gcc 4.7 only

2024-06-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56577

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|INVALID |DUPLICATE

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

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

[Bug tree-optimization/56576] wrong code for aliased union at -O3

2024-06-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56576

Andrew Pinski  changed:

   What|Removed |Added

 CC||tangyixuan at mail dot 
dlut.edu.cn

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

[Bug rtl-optimization/115320] wrong code with -O2/O3 when using union with different data type

2024-06-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115320

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|INVALID |DUPLICATE

--- Comment #2 from Andrew Pinski  ---
Dup of bug 56576 and others.

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

[Bug rtl-optimization/115320] wrong code with -O2/O3 when using union with different data type

2024-06-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115320

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
No. It is only well defined if used directly via the union variable otherwise
it is just another pointer access.

[Bug target/115255] sibcall at -O0 causes ICE in df_refs_verify on arm

2024-06-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115255

--- Comment #5 from Andrew Pinski  ---
The question comes is musttail going to always work at -O0 or should it just
fail at -O0 with an error message. Or rather is musttail is just a hack in
itself and should never be implemented.

[Bug sanitizer/115273] [12 Regression] passing zero to ctz() check missing

2024-06-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115273

--- Comment #4 from Andrew Pinski  ---
Note ubsan can detect (correctly) a different undefined behavior since GCC 13
(since r13-4988-g8692b15ae7c05e; aka PR108256) but the undefinedness of passing
0 to ctz is still not detected and that is a dup of bug 115127 .

[Bug sanitizer/115127] [12/13/14/15 Regression] passing zero to __builtin_ctz() check missing since r12-151

2024-06-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115127

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2024-05-18 00:00:00 |2024-06-02
 Status|UNCONFIRMED |NEW
   Keywords|needs-bisection,|
   |needs-reduction |
 Ever confirmed|0   |1
Summary|[12/13/14/15 Regression]|[12/13/14/15 Regression]
   |passing zero to |passing zero to
   |__builtin_ctz() check   |__builtin_ctz() check
   |missing |missing since r12-151

--- Comment #6 from Andrew Pinski  ---
Reduced testcase:
```
int f(int a)
{
return __builtin_ctz(a) == 0;
}

int main(void)
{
__builtin_printf("%d\n", f(0));
}
```


Caused by r12-151-g75f8900159133c .

[Bug sanitizer/115127] [12/13/14/15 Regression] passing zero to __builtin_ctz() check missing

2024-06-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115127

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

[Bug sanitizer/115273] [12 Regression] passing zero to ctz() check missing

2024-06-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115273

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #3 from Andrew Pinski  ---
Dup.

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

[Bug sanitizer/115273] [12 Regression] passing zero to ctz() check missing

2024-06-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115273

--- Comment #2 from Andrew Pinski  ---
Reduced testcase:
```
int f(int a)
{
return __builtin_ctz(a) == 0;
}

int main(void)
{
__builtin_printf("%d\n", f(0));
}
```

[Bug c++/115314] auto template parameter has const qualifier on it even though the original does not

2024-06-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115314

Andrew Pinski  changed:

   What|Removed |Added

Summary|Type of the `auto` template |auto template parameter has
   |parameter in a concept is   |const qualifier on it even
   |not decayed when called as  |though the original does
   |dependent name  |not
   Last reconfirmed||2024-06-01
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=107222,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=112555,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=104577
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
Confirmed. I thought I had saw an almost exact dup of this issue. The const
qualifier is added for the type incorrectly.

[Bug jit/103562] Jitted code produces incorrect result when returning 3-member struct from internal function

2024-06-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103562

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #9 from Andrew Pinski  ---
Fixed for GCC 11.3.0.

[Bug c++/115318] decltype(lambda) from an template function inside a templated lambda causes ICE

2024-06-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115318

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
Summary|decltype(lambda) with some  |decltype(lambda) from an
   |templates causes ICE|template function inside a
   ||templated lambda causes ICE
   Last reconfirmed||2024-06-01

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

[Bug analyzer/111536] -fanalyzer false positive with NRVO return

2024-05-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111536

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2024-06-01
 Status|UNCONFIRMED |NEW

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

Another reduced testcase, this time reduced from std::string:
```
struct g
{
  int t;
  g();
  g(const g&);
};

g foo1()
{
return g{};
}

```

[Bug analyzer/111536] -fanalyzer false positive with NRVO return

2024-05-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111536

Andrew Pinski  changed:

   What|Removed |Added

 CC||llvm at rifkin dot dev

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

[Bug analyzer/115313] False positive -fanalyzer use of uninitialized value due to not understand C++ front-end's NRVO

2024-05-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115313

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #3 from Andrew Pinski  ---
Dup.

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

[Bug analyzer/115313] False positive -fanalyzer use of uninitialized value due to not understand C++ front-end's NRVO

2024-05-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115313

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2024-06-01
Summary|False positive -fanalyzer   |False positive -fanalyzer
   |use of uninitialized value  |use of uninitialized value
   |due to std::string's|due to not understand C++
   |default constructor |front-end's NRVO

--- Comment #2 from Andrew Pinski  ---
Further reduced:
```
struct g
{
  int t;
  g();
  g(const g&);
};

g foo1()
{
return g{};
}
```

[Bug tree-optimization/114999] A few missing optimizations due to `a - b` and `b - a` not being detected as negatives of each other

2024-05-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114999

--- Comment #9 from Andrew Pinski  ---
```
float f(float a, float b, float x)
{
  x = a - b;
  float t = 0;
  t = t - x;
  return t/x;
}
```
! HONOR_NANS (type)  && ! HONOR_INFINITIES (type)



```
int f(int a, int b, int A)
{
  A = ~A;
  int t = 0;
  t = t - A;
  return A != 0 ? A : t;
}
```

Is not optimized at -O1 until phiopt3 .

[Bug tree-optimization/114999] A few missing optimizations due to `a - b` and `b - a` not being detected as negatives of each other

2024-05-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114999

--- Comment #8 from Andrew Pinski  ---
```
int f(int x)
{
x = ~x;
int t = (x >= 0 ? x : 0);
int t1 = (x <= 0 ? -x : 0);
return  t + t1;
}
```

abs(~x)

[Bug ipa/115309] Simple coroutine based generator is not optimized well

2024-05-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115309

Andrew Pinski  changed:

   What|Removed |Added

  Component|middle-end  |ipa

--- Comment #1 from Andrew Pinski  ---
Most of it is a missed inlining.

[Bug tree-optimization/115306] (X + 1) > Y ? -X : 1 pattern does not handle X=~X nor X = -X;

2024-05-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115306

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2024-05-31
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Mine, filing as I will get back to this in a few but want to finish up a
different patch.

[Bug tree-optimization/115306] New: (X + 1) > Y ? -X : 1 pattern does not handle X=~X nor X = -X;

2024-05-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115306

Bug ID: 115306
   Summary: (X + 1) > Y ? -X : 1 pattern does not handle X=~X nor
X = -X;
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: enhancement
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

The new pattern:
/* (1 - X) > Y ? X : 1 simplifies to (-X) >= Y ? X : 1 when
   X is unsigned for the same logic as above, just replace X with -X.  */
(simplify
 (cond (gt (minus integer_onep @0) @1) @0 integer_onep@2)
 (if (TYPE_UNSIGNED (type))
  (cond (ge (negate @0) @1) @0 @2)))

[Bug tree-optimization/115278] [13/14/15 Regression] -ftree-vectorize optimizes away volatile write on x86_64 since r13-3219

2024-05-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115278

--- Comment #7 from Andrew Pinski  ---
(In reply to avieira from comment #5)
> > I think we fixed similar bug on the read side.
> 
> I don't have the best memory, but the one I can remember is PR 111882, where
> we had the SAVE_EXPR. And the the fix was to not lower bitfields with
> non-constant offsets.

The one which Richard was thinking of was PR 114197 which I linked in the see
also.

[Bug middle-end/115022] -fstrub=disable and -minline-memops-threshold have a - in the index

2024-05-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115022

Andrew Pinski  changed:

   What|Removed |Added

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

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

[Bug lto/115300] gcc 14 cannot compile itself on Windows when bootstrap-lto is specified

2024-05-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115300

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2024-05-31
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
This looks more like a binutils ld issue. We are linking an executable here,
not a dll.

[Bug target/115299] [14/15 regression] pr86722.c failed to eliminate branch.

2024-05-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115299

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.2
Summary|[14 regression] pr86722.c   |[14/15 regression]
   |failed to eliminate branch. |pr86722.c failed to
   ||eliminate branch.

[Bug target/115299] [14 regression] pr86722.c failed to eliminate branch.

2024-05-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115299

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-05-31
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
ce differences:

13:
```
== Pass 2 ==

IF-THEN-JOIN block found, pass 2, test 4, then 6, join 7
scanning new insn with uid = 68.
scanning new insn with uid = 69.
scanning new insn with uid = 70.
scanning new insn with uid = 71.
scanning new insn with uid = 72.
scanning new insn with uid = 73.
Removing jump 14.
deleting insn with uid = 14.
deleting insn with uid = 5.
deleting block 6
Conversion succeeded on pass 2.

```


14/trunk:
```

IF-THEN-JOIN block found, pass 2, test 4, then 6, join 7


== no more changes

3 possible IF blocks searched.
1 IF blocks converted.
1 true changes made.

```

Maybe r14-53-g675b1a7f113adb .

[Bug c++/115291] armv8-a GCC emits float32x2_t loads from uninitialized stack

2024-05-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115291

--- Comment #2 from Andrew Pinski  ---
See https://libeigen.gitlab.io/docs/TopicPitfalls.html
section "C++11 and the auto keyword" explictly.

"In short: do not use the auto keywords with Eigen's expressions, unless you
are 100% sure about what you are doing. In particular, do not use the auto
keyword as a replacement for a Matrix<> type."

Describes the issue you are having.

[Bug plugins/115288] [15 Regression] File label-text.h not part of installation

2024-05-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115288

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-05-30
 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
I think this fixes the issue (which was introduced by r15-874-g9bda2c4c81b668
):
```
[apinski@xeond2 gcc]$ git diff Makefile.in
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 66d42cc41f8..67c00a9c23f 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1038,6 +1038,7 @@ SYSTEM_H = system.h hwint.h
$(srcdir)/../include/libiberty.h \
 PREDICT_H = predict.h predict.def
 CPPLIB_H = $(srcdir)/../libcpp/include/line-map.h \
$(srcdir)/../libcpp/include/rich-location.h \
+   $(srcdir)/../libcpp/include/label-text.h \
$(srcdir)/../libcpp/include/cpplib.h
 CODYLIB_H = $(srcdir)/../libcody/cody.hh
 INPUT_H = $(srcdir)/../libcpp/include/line-map.h input.h
```

Let me double check that and commit as obvious if it works.

[Bug plugins/115288] [15 Regression] File label-text.h not part of installation

2024-05-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115288

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |15.0
Summary|File label-text.h not part  |[15 Regression] File
   |of installation |label-text.h not part of
   ||installation

[Bug c/115290] [12/13/14/15 Regression] tree check fail in c_tree_printer, at c/c-objc-common.cc:330

2024-05-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115290

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
Summary|tree check fail in  |[12/13/14/15 Regression]
   |c_tree_printer, at  |tree check fail in
   |c/c-objc-common.cc:330  |c_tree_printer, at
   ||c/c-objc-common.cc:330
   Keywords||ice-on-valid-code
   Last reconfirmed||2024-05-30
   Target Milestone|--- |12.4
Version|unknown |15.0
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
:4:50: note: use '&\204[0] == _handshakes[0]' to compare the
addresses

I think it was introduced with r12-4148-g2dda00b734888d which also introduced
the warning. Since the diagnostic looks broken with release checking.


+   inform (location, "use %<&%D[0] %s &%D[0]%> to compare the addresses",
+   op0, op_symbol_code (code), op1);


%D here is expecting a decl but we have an expression.

[Bug c++/115291] armv8-a GCC emits float32x2_t loads from uninitialized stack

2024-05-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115291

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
  D.198035 = f (); [return slot optimization]
  v.m_lhs = 
  MEM[(struct CwiseNullaryOp *) + 8B] ={v} {CLOBBER(bob)};
  MEM[(struct scalar_constant_op *) + 12B] ={v} {CLOBBER(bob)};
  MEM[(struct scalar_constant_op *) + 12B].m_other = 0.0;
  D.198035 ={v} {CLOBBER(eos)};
  _6 = [(struct Matrix *)_4(D)].D.198029;
  _12 = v.m_lhs;




  auto v = Eigen::Product(f(), Eigen::Vector2f::Zero());

The bug is there is a temporary created for the return value of f but that is
destoried at the end of the full statement but the product does not happen
until afterwards in the use of v happens.

Rewriting the code like:
```
auto t = f();
  auto v = Eigen::Product(t, Eigen::Vector2f::Zero());
```

Fixes the code.

[Bug tree-optimization/115287] Missed optimzation: fold `div(v, a) * b + rem(v, a)` to `div(v, a) * (b - a) + v`

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115287

Andrew Pinski  changed:

   What|Removed |Added

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

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

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

[Bug tree-optimization/113105] Missing optimzation: fold `div(v, a) * b + rem(v, a)` to `div(v, a) * (b - a) + v`

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113105

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

[Bug tree-optimization/113072] `(a ^ CST0) & (~a ^ CST0)` is not optimized to 0 at the gimple level

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113072

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|ASSIGNED|RESOLVED

--- Comment #6 from Andrew Pinski  ---
So it turns out I filed a dup of this bug and then went and fixed the dup in a
better way then I mentioned here.

Anyways dup of bug 115224.

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

[Bug tree-optimization/115224] (a ^ 1) & (a ^ ~1) is not optimized to 0 at the gimplelevel

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115224

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

[Bug middle-end/115022] -fstrub=disable and -minline-memops-threshold have a - in the index

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115022

Andrew Pinski  changed:

   What|Removed |Added

URL||https://gcc.gnu.org/piperma
   ||il/gcc-patches/2024-May/653
   ||100.html
   Keywords||patch

--- Comment #2 from Andrew Pinski  ---
Patch submitted with some extra fixes I noticed for opindex for some options:
https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653100.html

[Bug libstdc++/115285] [13/14/15 Regression] std::unordered_set can have duplicate value

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115285

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #7 from Andrew Pinski  ---
I am suspecting it was
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=2c43f5ec9db163696de8691eb529df06c4999bcc
which caused the issue.

[Bug libstdc++/115285] [13/14/15 Regression] std::unordered_set can have duplicate value

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115285

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-05-30
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

[Bug libstdc++/115285] [13/14/15 Regression] std::unordered_set can have duplicate value

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115285

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||needs-bisection
   Target Milestone|13.4|12.4
Summary|[13/14/15 Regression]   |[13/14/15 Regression]
   |std::unordered_set can have |std::unordered_set can have
   |duplicate values since  |duplicate value
   |r13-1114|

--- Comment #6 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #2)
> r13-1114-gdc9b92facf87a6

Looks like this just exposed the issue with .insert. See my new testcase which
fails for GCC 12+ .

[Bug libstdc++/115285] [13/14/15 Regression] std::unordered_set can have duplicate values since r13-1114

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115285

--- Comment #5 from Andrew Pinski  ---
Created attachment 58312
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58312=edit
Testcase which fails for GCC 12+ (rather than 13+)

[Bug libstdc++/115285] [13/14/15 Regression] std::unordered_set can have duplicate values since r13-1114

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115285

--- Comment #4 from Andrew Pinski  ---
Though I think the standard says only one is entered rather than both ... But
not which one.

[Bug libstdc++/115285] [13/14/15 Regression] std::unordered_set can have duplicate values since r13-1114

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115285

--- Comment #3 from Andrew Pinski  ---
Looks to be a defect:
https://cplusplus.github.io/LWG/issue2844

[Bug libstdc++/115285] [13/14/15 Regression] std::unordered_set can have duplicate values since r13-1114

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115285

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |13.4
Summary|std::unordered_set can have |[13/14/15 Regression]
   |duplicate values|std::unordered_set can have
   ||duplicate values since
   ||r13-1114

--- Comment #2 from Andrew Pinski  ---
r13-1114-gdc9b92facf87a6

[Bug c++/115283] [14/15 Regression] "used but never defined" with extern templates

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115283

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2024-05-29
 Status|UNCONFIRMED |NEW

--- Comment #3 from Andrew Pinski  ---
Confirmed. attached the reduced testcase.

Note concept here for same is important, using `inline constexpr bool` instead
does not cause the warning to happen.

[Bug c++/115283] [14/15 Regression] "used but never defined" with extern templates

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115283

--- Comment #2 from Andrew Pinski  ---
Created attachment 58311
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58311=edit
Reduced

[Bug c++/115283] [14/15 Regression] "used but never defined" with extern templates

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115283

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.2
Summary|[14 Regression] "used but   |[14/15 Regression] "used
   |never defined" with extern  |but never defined" with
   |templates   |extern templates
   Keywords||diagnostic

[Bug libbacktrace/115212] testsuite should produce DejaGnu style summary, log

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115212

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
(In reply to Eric Gallager from comment #1)
> I think there's another bug for this, but I can't seem to remember which one
> at the moment...

PR 88002

[Bug tree-optimization/115214] tree-ssa-pre.c(ICE in find_or_generate_expression, at tree-ssa-pre.c:2780)

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115214

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |15.0

[Bug tree-optimization/115278] [13/14/15 Regression] -ftree-vectorize optimizes away volatile write on x86_64 since r13-3219

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115278

Andrew Pinski  changed:

   What|Removed |Added

Summary|[13/14/15 Regression]   |[13/14/15 Regression]
   |-ftree-vectorize optimizes  |-ftree-vectorize optimizes
   |away volatile write on  |away volatile write on
   |x86_64  |x86_64 since r13-3219
 CC||pinskia at gcc dot gnu.org

--- Comment #2 from Andrew Pinski  ---
Yes I was going to point to r13-3219-g25413fdb2ac249 also.

[Bug tree-optimization/115278] [13/14/15 Regression] -ftree-vectorize optimizes away volatile write on x86_64

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115278

Andrew Pinski  changed:

   What|Removed |Added

Summary|-ftree-vectorize optimizes  |[13/14/15 Regression]
   |away volatile write on  |-ftree-vectorize optimizes
   |x86_64  |away volatile write on
   ||x86_64
   Target Milestone|--- |13.4
   Last reconfirmed||2024-05-29
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Confirmed.
ifcvt removes it:
We go from:
```
  rt.D.2911.value_low = _25;
  rt.D.2911.value_high = _26;
  rt.D.2906.a = 99;
  rt.D.2906.b = 1;
  _32 = rt.D.2911.value_low;
  *WRITE.0_1 ={v} _32;
  _34 = rt.D.2911.value_high;
  *WRITE.0_1 ={v} _34;
```
to:
```
  rt.D.2911.value_low = _2;
  rt.D.2911.value_high = _3;
  _ifc__41 = rt.D.2906.D.2905;
  _ifc__42 = BIT_INSERT_EXPR <_ifc__41, 99, 0 (17 bits)>;
  _ifc__40 = BIT_INSERT_EXPR <_ifc__42, 1, 56 (8 bits)>;
  _44 = BIT_FIELD_REF <_ifc__42, 32, 0>;
  _46 = BIT_FIELD_REF <_ifc__40, 32, 32>;
  *WRITE.0_1 ={v} _46;
```

[Bug c++/115280] Concept can access private alias/typedef in a non-dependent classs

2024-05-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115280

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||accepts-invalid
   Last reconfirmed||2024-05-29
Summary|Concept can access private  |Concept can access private
   |alias in a classs   |alias/typedef in a
   ||non-dependent classs
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

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

<    3   4   5   6   7   8   9   10   11   12   >