[Bug tree-optimization/115449] `(truncate)a` and `(nop_convert)~(truncate)a` are bitwise inversion of each other

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

--- Comment #2 from Andrew Pinski  ---
Created attachment 58409
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58409=edit
Patch which I am testing

Just attaching it for now.

[Bug target/115176] rbit pattern should use bitreverse rtl now

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

Andrew Pinski  changed:

   What|Removed |Added

URL||https://gcc.gnu.org/piperma
   ||il/gcc-patches/2024-June/65
   ||4271.html
   Keywords||patch

--- Comment #3 from Andrew Pinski  ---
Patch submitted:
https://gcc.gnu.org/pipermail/gcc-patches/2024-June/654271.html

[Bug tree-optimization/115449] `(truncate)a` and `(nop_convert)~(truncate)a` are bitwise inversion of each other

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org
   Last reconfirmed||2024-06-11
 Ever confirmed|0   |1
Summary|`(truncate)a` and   |`(truncate)a` and
   |`(nop_convert)~(truncate)a` |`(nop_convert)~(truncate)a`
   ||are bitwise inversion of
   ||each other

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

[Bug tree-optimization/115449] New: `(truncate)a` and `(nop_convert)~(truncate)a`

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

Bug ID: 115449
   Summary: `(truncate)a` and `(nop_convert)~(truncate)a`
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Keywords: missed-optimization, TREE
  Severity: enhancement
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
void setBit(unsigned char , int b) {
   unsigned char c = 0x1UL << b;
   a &= ~c;
a |= c;
}

void setBit(signed char , int b) {
   signed char c = 0x1UL << b;
   a &= ~c;
a |= c;
}
```

We should be able to optimize both setBit on the gimple level to:
```
  _1 = 1 << b_4(D);
  c_5 = ([un]signed char) _1;
  _2 = *a_7(D);
  _3 = _2 | c_5;
  *a_7(D) = _3;
```
Removing the ~ that is there.


So we already have this pattern (deals with some type changes though) in
gimple:
 /* (~x | y) & x -> x & y */
 /* (~x & y) | x -> x | y */
 (simplify
  (bitop:c (rbitop:c @2 @1) @0)
  (with { bool wascmp; }
   (if (bitwise_inverted_equal_p (@0, @2, wascmp)
&& (!wascmp || element_precision (type) == 1))
(bitop @0 @1

The problem is bitwise_inverted_equal_p does not see that:
  c.0_4 = (signed char) _1;
  _5 = ~c.0_4;
  _16 = (charD.11) _5;

and
  c_11 = (charD.11) _1;

are bitwise inversions of each other.

[Bug tree-optimization/115447] GCC fails to tail call unless variable wrapped in a block

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

--- Comment #3 from Andrew Pinski  ---
Note if you don't do the assignment (to extend the lifetime of the temp), GCC
does tail calls bar unlike clang/LLVM.

[Bug tree-optimization/115447] GCC fails to tail call unless variable wrapped in a block

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
> Putting the variable inside this block does not change the semantics of the 
> function

YES it does, the side effect of the dtor happens after bar in the original case
and before bar in the second case. They could have side effects on global
memory that is outside of what the front-end knows.

[Bug tree-optimization/115447] GCC fails to tail call unless variable wrapped in a block

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

--- Comment #1 from Andrew Pinski  ---
Created attachment 58408
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58408=edit
testcase from godbolt

[Bug c++/115446] [15 Regression] Segfault when exporting operator new

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

--- Comment #1 from Andrew Pinski  ---
s/unsigned long/decltype(sizeof(0))/

to make the testcase more portable since not all targets use `unsigned long` as
size_t.

[Bug c++/115446] [15 Regression] Segfault when exporting operator new

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

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |15.0

[Bug target/114905] aarch64 locally_streaming function ICE in dwarf2cfi due to mismatched CFA instructions in prologue/epilogue

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

Andrew Pinski  changed:

   What|Removed |Added

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

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

Note it looks like the location of the attributes is not correct according to
the ACLE though.
```
#include 
__arm_locally_streaming
void
no_gprs_saved_very_streaming (__SVBool_t x)
__arm_streaming_compatible
{
  asm ("");
}
```

is the corrected testcase and yes we still ICE.

[Bug sanitizer/115205] ICE when using -fsanitize=hwaddress

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

--- Comment #5 from Andrew Pinski  ---
Patch posted:
https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652975.html

[Bug jit/115442] gcc/jit/jit-recording.cc fails to build against musl: attempt to use poisoned "calloc"

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

Andrew Pinski  changed:

   What|Removed |Added

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

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

[Bug target/115439] [15 Regression] ICEs after r15-638 on master-thumb_m55_hard_eabi

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

--- Comment #7 from Andrew Pinski  ---
(In reply to Robin Dapp from comment #6)
> Are you going to post a patch?

I was going to let the arm folks take care of it since I have no way to test
it.

[Bug jit/115442] gcc/jit/jit-recording.cc fails to build against musl: attempt to use poisoned "calloc"

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

--- Comment #3 from Andrew Pinski  ---
(In reply to Ismael Luceno from comment #2)
> Created attachment 58406 [details]
> Avoid  poisoning on musl

That is not the correct fix. see comment #1 for the correct one.

[Bug jit/115442] gcc/jit/jit-recording.cc fails to build against musl: attempt to use poisoned "calloc"

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

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2024-06-11
 Status|UNCONFIRMED |ASSIGNED
   Assignee|dmalcolm at gcc dot gnu.org|pinskia at gcc dot 
gnu.org

--- Comment #1 from Andrew Pinski  ---
I have an obvious fix at least for the trunk.

diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc
index 68a2e860c1f..70830e34965 100644
--- a/gcc/jit/jit-recording.cc
+++ b/gcc/jit/jit-recording.cc
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3.  If not see
 .  */

 #include "config.h"
+#define INCLUDE_SSTREAM
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
@@ -29,7 +30,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "jit-builtins.h"
 #include "jit-recording.h"
 #include "jit-playback.h"
-#include 

 namespace gcc {
 namespace jit {

[Bug target/115439] [15 Regression] ICEs after r15-638 on master-thumb_m55_hard_eabi

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

--- Comment #5 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #4)
> I think something like this:
> ```
> [apinski@xeond2 arm]$ git diff mve.md
> diff --git a/gcc/config/arm/mve.md b/gcc/config/arm/mve.md
> index 9fe51298cdc..8af4797e935 100644
> --- a/gcc/config/arm/mve.md
> +++ b/gcc/config/arm/mve.md
> @@ -6897,6 +6897,12 @@ (define_expand "vcond_mask_"
>   (match_operand:MVE_VLD_ST 2 "s_register_operand")))]
>"TARGET_HAVE_MVE"
>  {
> +  if (!register_operand (operands[3], mode))
> +operands[3] = force_reg (operands[3]);
> +  if (!register_operand (operands[1], mode))
> +operands[1] = force_reg (operands[1]);
> +  if (!register_operand (operands[2], mode))
> +operands[1] = force_reg (operands[2]);

copy and pasto:`operands[1] = force_reg (operands[1]);` is the correct line for
above.

>switch (GET_MODE_CLASS (mode))
>  {
>case MODE_VECTOR_INT:
> 
> ```
> Signed-off-by: Andrew Pinski  

[Bug target/115439] [15 Regression] ICEs after r15-638 on master-thumb_m55_hard_eabi

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

--- Comment #4 from Andrew Pinski  ---
I think something like this:
```
[apinski@xeond2 arm]$ git diff mve.md
diff --git a/gcc/config/arm/mve.md b/gcc/config/arm/mve.md
index 9fe51298cdc..8af4797e935 100644
--- a/gcc/config/arm/mve.md
+++ b/gcc/config/arm/mve.md
@@ -6897,6 +6897,12 @@ (define_expand "vcond_mask_"
  (match_operand:MVE_VLD_ST 2 "s_register_operand")))]
   "TARGET_HAVE_MVE"
 {
+  if (!register_operand (operands[3], mode))
+operands[3] = force_reg (operands[3]);
+  if (!register_operand (operands[1], mode))
+operands[1] = force_reg (operands[1]);
+  if (!register_operand (operands[2], mode))
+operands[1] = force_reg (operands[2]);
   switch (GET_MODE_CLASS (mode))
 {
   case MODE_VECTOR_INT:

```
Signed-off-by: Andrew Pinski  

[Bug middle-end/115428] 3 * unused in today's build

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

--- Comment #3 from Andrew Pinski  ---
I can't figure out why GCC didn't warn about summary_cast_reg though ...

[Bug middle-end/115428] 3 * unused in today's build

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #1)
> The reason why has_pointer_operand_p is not warned about is because it is a
> `static inline` function which GCC will never warn about. Looks like clang
> only warns about them if they are in a main source.

See PR 52105 for that.

> 
> The reason why relation_to_code is not warned about is a similar reasons but
> this time for `static const` variables.

This one see PR 44598.

[Bug c/115428] 3 * unused in today's build

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

--- Comment #1 from Andrew Pinski  ---
The reason why has_pointer_operand_p is not warned about is because it is a
`static inline` function which GCC will never warn about. Looks like clang only
warns about them if they are in a main source.

The reason why relation_to_code is not warned about is a similar reasons but
this time for `static const` variables.

[Bug c++/115431] ICE: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in decl_template_parm_check, at cp/cp-tree.h:5131

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

Andrew Pinski  changed:

   What|Removed |Added

 Depends on||115331

--- Comment #1 from Andrew Pinski  ---
Might be a dup of bug 115331.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115331
[Bug 115331] [13/14/15 Regression] ICE-on-invalid passing a typoed lambda to a
list-initializer

[Bug target/115439] [15 Regression] ICEs after r15-638 on master-thumb_m55_hard_eabi

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

--- Comment #1 from Andrew Pinski  ---
https://gcc.gnu.org/pipermail/gcc-patches/2024-June/654086.html

[Bug target/115439] [15 Regression] ICEs after r15-638 on master-thumb_m55_hard_eabi

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

Andrew Pinski  changed:

   What|Removed |Added

 Target||arm-eabi
  Component|c++ |target
Summary|[Regression] ICEs after |[15 Regression] ICEs after
   |7ca35f2e43 on   |r15-638 on
   |master-thumb_m55_hard_eabi  |master-thumb_m55_hard_eabi
   Keywords||ice-on-valid-code
   Target Milestone|--- |15.0

[Bug c/95715] __atomic_fetch_add accepts nonsense arguments

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||patrick at rivosinc dot com

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

[Bug c/115441] Pointer/integer mismatch in __atomic_fetch-* not covered by -Wint-conversion

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
Actually yes it is a dup of bug 95715, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95715#c1 .

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

[Bug c/115441] Pointer/integer mismatch in __atomic_fetch-* not covered by -Wint-conversion

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
I think this is a dup of bug 95715.

[Bug driver/115440] unrecognized command-line option '--c++17'; did you mean '--stdc++17'?

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

Andrew Pinski  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/115143] [11 Regression] tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:85

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

Andrew Pinski  changed:

   What|Removed |Added

Summary|[11/12 Regression] tree |[11 Regression] tree check:
   |check: expected class   |expected class 'type', have
   |'type', have 'exceptional'  |'exceptional' (error_mark)
   |(error_mark) in |in
   |useless_type_conversion_p,  |useless_type_conversion_p,
   |at gimple-expr.cc:85|at gimple-expr.cc:85
  Known to work||12.3.1

--- Comment #18 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #16)
> Fixed on the GCC 13 branch too. Backporting further requires removing the
> hunk that handles diamond bbs as that was not in 12 or 11. I will handle
> that tomorrow.

Fixed on the GCC 12 branch too now. Will handle 11 tomorrow.

[Bug target/113042] popcount of 8bits and 128bits can be improved for !TARGET_CSSC

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

--- Comment #4 from Andrew Pinski  ---
New patch posted:
https://gcc.gnu.org/pipermail/gcc-patches/2024-June/654115.html

[Bug target/113870] Add V2HF support

2024-06-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113870
Bug 113870 depends on bug 113869, which changed state.

Bug 113869 Summary: V4HF->V4SF pattern seems to be missing
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113869

   What|Removed |Added

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

[Bug target/113869] V4HF->V4SF pattern seems to be missing

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
Fixed. Note V4SF->V4HF was added with
r15-1182-ge7cd8ea1fa3e48404954bb7c06e9bcd603f132dd.

https://gcc.gnu.org/pipermail/gcc-cvs/2024-June/404047.html

[Bug target/113880] V2SF->V2DF conversion pattern seems to be missing

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #3 from Andrew Pinski  ---
Fixed. Note V2DF->V2SF was added with
r15-1182-ge7cd8ea1fa3e48404954bb7c06e9bcd603f132dd.

https://gcc.gnu.org/pipermail/gcc-cvs/2024-June/404047.html

[Bug tree-optimization/115438] [15 Regression] 503.bwaves_r regressed 5-11% on different x86_64 machines at -Ofast -march=native since r15-1006-gd93353e6423eca

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

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization
   Target Milestone|--- |15.0
 Blocks||53947
Version|14.0|15.0
 CC||pinskia at gcc dot gnu.org
Summary|503.bwaves_r regressed  |[15 Regression]
   |5-11% on different x86_64   |503.bwaves_r regressed
   |machines at -Ofast  |5-11% on different x86_64
   |-march=native since |machines at -Ofast
   |r15-1006-gd93353e6423eca|-march=native since
   ||r15-1006-gd93353e6423eca


Referenced Bugs:

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

[Bug c++/115430] Cannot take address of template function

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

Andrew Pinski  changed:

   What|Removed |Added

  Known to fail||3.4.6

--- Comment #2 from Andrew Pinski  ---
Note GCC 4.4.7 and before gave the following error message:
:5: error: argument of type 'void' does not match 'int (*)(int)'

[Bug c/115096] -fstrict-aliasing miscompilation or missing warning

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||Explorer09 at gmail dot com

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

[Bug other/115437] Wrong optimized code - GCC didn't detect a variable is modified

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|INVALID |DUPLICATE

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

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

[Bug other/115437] Wrong optimized code - GCC didn't detect a variable is modified

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
There is an alias violation here.
Use -fno-strict-aliasing or as you shown use the correct pointer type
originally.

That is stores to `uint8_t *` and loads from `char *` are considered different
aliasing sets and GCC optimizes based on that.

[Bug c++/115430] Cannot take address of template function

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

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-06-11
 Ever confirmed|0   |1
  Known to fail||4.5.3
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
Reduced (and modified to be C++98):
```
template
int Func(T);
typedef int (*funcptrtype)(int);
funcptrtype fp1 = ;
funcptrtype fp2 = (0, );
```

[Bug c++/47940] warn about calls to a pure virtual indirectly from a constructor/destructor

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-06-11
 Blocks||87403
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=1925,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=6006
 Ever confirmed|0   |1
Summary|warn about calls to a pure  |warn about calls to a pure
   |virtual from a  |virtual indirectly from a
   |constructor/destructor  |constructor/destructor

--- Comment #8 from Andrew Pinski  ---
.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87403
[Bug 87403] [Meta-bug] Issues that suggest a new warning

[Bug ipa/115435] Issue warning for indirect call to pure virtual function in ctor or dtor

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=6006

--- Comment #2 from Andrew Pinski  ---
Dup. will update that bug.

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

[Bug middle-end/87403] [Meta-bug] Issues that suggest a new warning

2024-06-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87403
Bug 87403 depends on bug 115435, which changed state.

Bug 115435 Summary: Issue warning for indirect call to pure virtual function in 
ctor or dtor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115435

   What|Removed |Added

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

[Bug c++/47940] warn about calls to a pure virtual from a constructor/destructor

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||redi at gcc dot gnu.org

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

[Bug c++/6006] problem with pure virtual functions and destructord

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|FIXED   |INVALID

[Bug ipa/115435] Issue warning for indirect call to pure virtual function in ctor or dtor

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

Andrew Pinski  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/115423] Inlined strcmp optimizes poorly

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

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
 Ever confirmed|0   |1
   Last reconfirmed||2024-06-11
 Status|UNCONFIRMED |NEW

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

[Bug c/115424] 'auto' type inference not working when struct declared in rhs, even when the final type is not anonymous

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

--- Comment #1 from Andrew Pinski  ---
Hmm from the commit message (r13-3620-ge3c898e12d0ace):
```
* The standard feature disallows the declaration from declaring
  anything that's not an ordinary identifier (thus, the initializer
  cannot declare a tag or the members of a structure or union), while
  making it undefined behavior for it to declare more than one
  ordinary identifier.  (For the latter, while I keep the existing
  error from __auto_type in the case of more than one declarator, I
  don't restrict other ordinary identifiers from being declared in
  inner scopes such as GNU statement expressions.  I do however
  disallow defining the members of an enumeration inside the
  initializer (if the enum definition has no tag, that doesn't
  actually violate a constraint), to avoid an enum type becoming
  accessible beyond where it would have been without auto.
  (Preventing new types from escaping the initializer - thus, ensuring
  that anything written with auto corresponds to something that could
  have been written without auto, modulo multiple evaluation of VLA
  size expressions when not using auto - is a key motivation for some
  restrictions on what can be declared in the initializer.)

The rule on shadowing and restrictions on other declarations in the
initializer are actually general rules for what C2x calls
underspecified declarations, a description that covers constexpr as
well as auto (in particular, this disallows a constexpr initializer
from referencing the variable being initialized).  Thus, some of the
code added for those restrictions will also be of use in implementing
C2x constexpr.

```

So this might be expected.

[Bug c++/115425] ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778

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

--- Comment #1 from Andrew Pinski  ---
> 15 regressions

It might not be because this is a checking enabled ICE.

[Bug tree-optimization/115426] ICE: in execute_todo, at passes.cc:2138

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
Reduced testcase that ICEs on all targets:
```
 _Complex float fcs() {
  _Complex float r;
  __asm__(""  : "=X" (__imag__ r)  );
  return r;
 } 
```

Looks like this has been ICEing for a while with checking enabled.

[Bug libstdc++/115421] Multi-threaded condition_variable app throws when linking as -static on Linux

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

--- Comment #13 from Andrew Pinski  ---
(In reply to Liviu Ionescu from comment #12)
> Isn't it possible to fix libstdc++ in order to run static multi-threaded
> apps on older systems too?

Well it depends. glibc changed how libpthread works in 2.34 and above. So
someone with the specific versions that you are testing with need to debug it
to see what is going wrong. It might need `-Wl,--whole-archive -lpthread
-Wl,--no-whole-archive` as mentioned in PR 58909 or some other changes.

[Bug libstdc++/115421] Multi-threaded condition_variable app throws when linking as -static on Linux

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

--- Comment #7 from Andrew Pinski  ---
Are you sure that arch does not patch glibc to make it broken?

[Bug libstdc++/115421] Multi-threaded condition_variable app throws when linking as -static on Linux

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

--- Comment #6 from Andrew Pinski  ---
apinski@xeond:~/src/upstream-gcc-match$ /lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Ubuntu GLIBC 2.35-0ubuntu3.8) stable release version 2.35.
Copyright (C) 2022 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.
Compiled by GNU CC version 11.4.0.
libc ABIs: UNIQUE IFUNC ABSOLUTE
For bug reporting instructions, please see:
.
apinski@xeond:~/src/upstream-gcc-match$ ~/upstream-gcc-match/bin/g++ -static -g
-lpthread t.cc
apinski@xeond:~/src/upstream-gcc-match$ ./a.out
Usage: sleepy-thread N
apinski@xeond:~/src/upstream-gcc-match$ ./a.out  4
abcd

[Bug libstdc++/115421] Multi-threaded condition_variable app throws when linking as -static on Linux

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

--- Comment #4 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #3)
> This works fine with glibc 2.34 and above.

I should say with glibc 2.34 and above and GCC 13+.
Other combinations are know to fail since you need to link in the whole
libpthread as there are weak symbols used to detect if the program was single
threaded or not.

[Bug libstdc++/115421] Multi-threaded condition_variable app throws when linking as -static on Linux

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #3 from Andrew Pinski  ---
This works fine with glibc 2.34 and above.

[Bug libstdc++/115421] Multi-threaded condition_variable app throws when linking as -static on Linux

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

--- Comment #2 from Andrew Pinski  ---
What version of glibc do you have?

[Bug libstdc++/115421] Multi-threaded condition_variable app throws when linking as -static on Linux

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

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

[Bug libstdc++/115422] Multi-threaded condition_variable app throws when linking as -static on Linux

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

Andrew Pinski  changed:

   What|Removed |Added

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

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

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

[Bug libstdc++/115420] Default constructor of unordered_map deleted

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
You need to do:
#include 


This is documented already at https://gcc.gnu.org/gcc-13/porting_to.html too.

[Bug target/115418] Extra movapd emitted for MAX implementation

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

Andrew Pinski  changed:

   What|Removed |Added

Summary|[14 regression] Extra   |Extra movapd emitted for
   |movapd emitted for MAX  |MAX implementation
   |implementation  |

--- Comment #2 from Andrew Pinski  ---
Note the issue is ix86_expand_sse_fp_minmax only handles LT/UNGE but it should
handle GT/UNLT with both parts swapped (comparison and true/false).

Note this was just by accident that GCC 14 does not work.

[Bug target/115418] [14 regression] Extra movapd emitted for MAX implementation

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

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
 Target||x86_64-linux-gnu
   Last reconfirmed||2024-06-10

--- Comment #1 from Andrew Pinski  ---
The difference between GCC 14 and 15 is:

GCC 14:
  _1 = a_4(D) < _5;
  _7 = _1 ? _5 : a_4(D);

GCC 15:
  _8 = _4 > a_5(D);
  _7 = _8 ? _4 : a_5(D);


GCC 15's IR gets recognized for UNSPEC_IEEE_MAX while GCC 14's is not.

If anything the target should recognize both cases ... Since both are
canonical.

[Bug c++/115417] Destructor is noexcept even though the class has a throwing destructor subobject in an anonymous union

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

Andrew Pinski  changed:

   What|Removed |Added

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

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

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

[Bug c++/115417] Destructor is noexcept even though the class has a throwing destructor subobject in an anonymous union

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

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Resolution|DUPLICATE   |---
 Status|RESOLVED|NEW
   Last reconfirmed||2024-06-10
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=115222

--- Comment #3 from Andrew Pinski  ---
Actually let's reopen this for a second since of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115222#c4 .

[Bug c++/115417] Destructor is noexcept even though the class has a throwing destructor subobject in an anonymous union

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

--- Comment #2 from Andrew Pinski  ---
Note it is not just anonymous unions, it is all unions.

[Bug c++/115222] gcc ignores noexcept on fields' deconstructors in an union

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||janschultke at googlemail dot 
com

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

[Bug middle-end/115411] ICE : in expand_call, at calls.cc:3668

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

Andrew Pinski  changed:

   What|Removed |Added

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

[Bug middle-end/115411] ICE : in expand_call, at calls.cc:3668

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

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=84964,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=100536
 Target||x86_64

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

[Bug testsuite/115415] New test case gcc.dg/torture/pr115388.c in r15-1163-g818e760528d436 hangs

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
   Target Milestone|--- |15.0
   Keywords||testsuite-fail
 Status|ASSIGNED|RESOLVED

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

[Bug testsuite/115415] New test case gcc.dg/torture/pr115388.c in r15-1163-g818e760528d436 hangs

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

Andrew Pinski  changed:

   What|Removed |Added

  Component|other   |testsuite
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2024-06-10

--- Comment #1 from Andrew Pinski  ---
Mine. It is a testcase issue. A simple s/char/signed char/ should fix it.

[Bug middle-end/115388] [15 Regression] wrong code at -O3 on x86_64-linux-gnu since r15-571-g1e0ae1f52741f7

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

--- Comment #8 from Andrew Pinski  ---
(In reply to Wilco from comment #7)
> (In reply to Richard Biener from comment #6)
> > Fixed.  Unfortunately this didn't fix PR115256 if I checked correctly.  Keep
> > searching!
> 
> The testcase hangs on AArch64, so this commit didn't fix it...

I suspect the issue is char being unsigned on a few targets. I will fix it in a
few hours.

[Bug tree-optimization/115404] [15 Regression] possibly wrong code on glibc-2.39 since r15-1113-gde05e44b2ad963

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

--- Comment #5 from Andrew Pinski  ---
(In reply to Uroš Bizjak from comment #4)
> I can hit ICE with the following testcase:

Then it is most likely a dup of bug 115387 .

[Bug c++/115410] Missing optimization: typeid(*a)==typeid(*b) could be optimized to a->_vptr==b->_vptr

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

--- Comment #6 from Andrew Pinski  ---
They can be different due to the way shared libraries work.

[Bug c++/115410] Missing optimization: typeid(*a)==typeid(*b) could be optimized to a->_vptr==b->_vptr

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #4 from Andrew Pinski  ---
>From the header:
Even with the new abi, on systems that support dlopen
// we can run into cases where type_info names aren't merged,
// so we still need to do string comparison

[Bug c++/115410] Missing optimization: typeid(*a)==typeid(*b) could be optimized to a->_vptr==b->_vptr

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

--- Comment #3 from Andrew Pinski  ---
Except it is not valid. 

See https://gcc.gnu.org/pipermail/libstdc++/2004-February/021443.html which
changed this to be always a string comparison.

[Bug c++/115410] Missing optimization: typeid(*a)==typeid(*b) could be optimized to a->_vptr==b->_vptr

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

--- Comment #1 from Andrew Pinski  ---
I am not so sure. Many times the comparison becomes a string comparison and not
comparing the vtable.

[Bug target/115409] avx512 intrinsics trigger -Wshift-overflow

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

--- Comment #2 from Andrew Pinski  ---
Note the warning in this case normally does not show up unless you are using
-Wsystem-headers  . We should fix the warning still.

[Bug target/115409] avx512 intrinsics trigger -Wshift-overflow

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

Andrew Pinski  changed:

   What|Removed |Added

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

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

Note patches should be sent to gcc-patches@ after reading
https://gcc.gnu.org/contribute.html .

Also the warning only happens if you use -Wshift-overflow=2 as documented.

Next time also show the full command line that is used for compiling.

[Bug target/113042] popcount of 8bits and 128bits can be improved for !TARGET_CSSC

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

--- Comment #3 from Andrew Pinski  ---
https://gcc.gnu.org/pipermail/gcc-patches/2024-June/654011.html

I will implement the TI change later as it requires some middle-end changes
still.

[Bug target/115408] regression between gcc 13.3.0 and 14.1.0 using -mips16 and -minterlink-mips16 with openssl

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
How did you configure gcc for both versions of GCC?

[Bug target/113218] gcc -pg fails on contemporary FreeBSD

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #3 from Andrew Pinski  ---
Fixed by r15-1124-g48abb540701447b0cd9df7542720ab65a34fc1b1 .
https://gcc.gnu.org/pipermail/gcc-cvs/2024-June/403916.html

[Bug libstdc++/115402] std::atomic_ref compile-error in compare_exchange_[weak/strong]() and wait()

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

--- Comment #4 from Andrew Pinski  ---
https://lists.isocpp.org/lib/2024/06/28451.php

[Bug libstdc++/115402] std::atomic_ref compile-error in compare_exchange_[weak/strong]() and wait()

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

--- Comment #3 from Andrew Pinski  ---
https://cplusplus.github.io/LWG/issue3508

[Bug libstdc++/115402] std::atomic_ref compile-error in compare_exchange_[weak/strong]() and wait()

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

--- Comment #2 from Andrew Pinski  ---
Note libc++ also fails this. So Does Microsoft's c++ library using MSVC.

So I am not sure if this is a bug or not.

[Bug libstdc++/115402] std::atomic_ref compile-error in compare_exchange_[weak/strong]() and wait()

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

--- Comment #1 from Andrew Pinski  ---
Created attachment 58393
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58393=edit
Full testcase from compiler explorer link

[Bug c++/115403] [15 Regression] highway build from git fails with 'target specific option mismatch' (templates) since r15-902-geff00046409a72

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Keywords||rejects-valid
 CC||pinskia at gcc dot gnu.org
 Ever confirmed|0   |1
   Last reconfirmed||2024-06-09
Summary|[15 Regression]  highway|[15 Regression]  highway
   |build from git fails with   |build from git fails with
   |'target specific option |'target specific option
   |mismatch' since |mismatch'  (templates)
   |r15-902-geff00046409a72 |since
   ||r15-902-geff00046409a72
   Target Milestone|--- |15.0

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

[Bug target/115406] [15 Regression] wrong code with vector compare at -O0 with -mavx512f

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

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |15.0
 CC||pinskia at gcc dot gnu.org

[Bug target/115397] [15 Regression] ICE 'during RTL pass: split1' on numpy-1.26.4 i686-linux '-fPIC -mavx512f' since r15-1100-gec985bc97a0157

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||zsojka at seznam dot cz

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

[Bug rtl-optimization/115407] [15 Regression] ICE: RTL flag check: CONSTANT_POOL_ADDRESS_P used with unexpected rtx code 'reg' in get_pool_constant, at varasm.cc:4046 with -O -mcmodel=large -mavx512bw

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

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 115397 ***

[Bug middle-end/115405] wrong code with _BitInt() sign-extension with -fno-strict-aliasing -O1 and above

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

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-06-09
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
  Component|rtl-optimization|middle-end

--- Comment #1 from Andrew Pinski  ---
Confirmed. Looks to be a mising sign extend when expanding the VCE like
MEM_REF.


;; _4 = MEM[(_BitInt(17) *)];

(insn 8 7 9 (parallel [
(set (reg:SI 103)
(and:SI (reg/v:SI 100 [ bD.2205 ])
(const_int 131071 [0x1])))
(clobber (reg:CC 17 flags))
]) "/app/example.cpp":6:10 -1
 (nil))

(insn 9 8 0 (set (reg:SI 99 [ _4 ])
(reg:SI 103)) "/app/example.cpp":6:10 -1
 (nil))

;; b ={v} {CLOBBER(eos)};

(nil)

;; if (_4 != -65536)

(insn 10 9 11 (set (reg:CCZ 17 flags)
(compare:CCZ (reg:SI 99 [ _4 ])
(const_int -65536 [0x]))) "/app/example.cpp":13:6
-1
 (nil))

[Bug libstdc++/114498] Consider deprecating then removing TR1 headers

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

Andrew Pinski  changed:

   What|Removed |Added

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

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

[Bug libstdc++/115399] std::tr2::dynamic_bitset shift behaves differently from std::bitset

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
Note I think std::tr2 should be deprecated in a similar way as std::tr1 is
being considered.

[Bug tree-optimization/115392] Missed optimization: fold `(a^b) <= 3` to `b < 4` for bool a and know that (a^b) is non zero

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

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Severity|normal  |enhancement
Summary|Missed optimization: fold   |Missed optimization: fold
   |`3 / (b ^ a)` to `b < 4`|`(a^b) <= 3` to `b < 4` for
   ||bool a and know that (a^b)
   ||is non zero
   Last reconfirmed||2024-06-08
  Component|c++ |tree-optimization
 Status|UNCONFIRMED |NEW
   Keywords||missed-optimization

--- Comment #1 from Andrew Pinski  ---
Confirmed. Note GCC already transform `3 / (b ^ a)` into `(a^b) <= 3`. But does
not transform that into `b <= 3` when we know that `a` has a [0,1] range.


A simple pattern like:
```
(for cmp (gt le)
 (simplify
  (cmp:c (bit_xor @0 zero_one_valued_p@1) INTEGER_CST@2)
  (if ((wi::to_wide (2) & 1) == 1)
   (cmp @0 @2)))
```
Should work.

Note this can be expanded into more if needed

[Bug web/115391] Suggest add current size of git repository to git page

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #3 from Andrew Pinski  ---
Also you can use `--depth=1` to speed up the checkout if you don't need the
full history.

I am going to close this as won't fix as this is a workflow issue and there are
ways to improve the workflow even with slow internet connections (e.g.
--depth=1).

[Bug target/115397] [15 Regression] ICE 'during RTL pass: split1' on numpy-1.26.4 i686-linux '-fPIC -mavx512f'

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

Andrew Pinski  changed:

   What|Removed |Added

 Target||x86_64-linux-gnu
   Target Milestone|--- |15.0
   Keywords||ice-checking,
   ||ice-on-valid-code
Version|14.0|15.0

[Bug c++/115398] [15 regression] RTL flag check: CONSTANT_POOL_ADDRESS_P used with unexpected rtx code 'plus' in get_pool_constant, at varasm.cc:4046

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
(In reply to Sam James from comment #1)
> Possibly a dupe of PR115397?

yep

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

[Bug target/115397] [15 Regression] ICE 'during RTL pass: split1' on numpy-1.26.4 i686-linux '-fPIC -mavx512f'

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||manuel.lauss at googlemail dot 
com

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

[Bug tree-optimization/115395] [15 regression] libarchive miscompiled with -O2 -march=znver2 -fno-vect-cost-model

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

Andrew Pinski  changed:

   What|Removed |Added

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

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

Looks like it is doing the add twice:
```
  vect_offset_14.29_104 = _84 + vect__18.28_103;
  _106 = .REDUC_PLUS (vect_offset_14.29_104);
  _107 = offset_9 + _106;
```

Once before the reduction and once after.

[Bug tree-optimization/115395] [15 regression] libarchive miscompiled with -O2 -march=znver2 -fno-vect-cost-model

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

Andrew Pinski  changed:

   What|Removed |Added

Version|unknown |15.0
 CC||pinskia at gcc dot gnu.org
   Target Milestone|--- |15.0
   Keywords||wrong-code

[Bug middle-end/115388] [15 Regression] wrong code at -O3 on x86_64-linux-gnu

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

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-06-07
   Keywords||needs-bisection
  Component|tree-optimization   |middle-end
 Ever confirmed|0   |1
Summary|wrong code at -O3 on|[15 Regression] wrong code
   |x86_64-linux-gnu|at -O3 on x86_64-linux-gnu
   Target Milestone|--- |15.0
 Status|UNCONFIRMED |NEW

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

[Bug fortran/115390] Bogus -Wuninitialized warning when using CHARACTER(*) argument in BIND(C) function

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-06-07
   Keywords||diagnostic, wrong-code
 Ever confirmed|0   |1

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

[Bug tree-optimization/115387] [15 regression] RISC-V: ICE in iovsprintf.c

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

Andrew Pinski  changed:

   What|Removed |Added

Summary|[15] RISC-V: ICE in |[15 regression] RISC-V: ICE
   |iovsprintf.c|in iovsprintf.c
   Target Milestone|--- |15.0
   Keywords||ice-on-valid-code
  Component|target  |tree-optimization

[Bug rtl-optimization/115384] [15 Regression] ICE: RTL check: expected code 'const_int', have 'const_wide_int' in simplify_binary_operation_1, at simplify-rtx.cc:4088

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
CONST_VECTOR_DUPLICATE_P (op1) does not check if the operand a CONST_INT or a
CONST_WIDE_INT.

(insn 6 5 7 2 (set (reg:V1TI 101 [ _2 ])
(ashiftrt:V1TI (reg:V1TI 102 [ wD.2793 ])
(const_int 4 [0x4]))) "/app/example.cpp":8:9 6884
{*ashrv1ti3_internal}
 (expr_list:REG_DEAD (reg:V1TI 102 [ wD.2793 ])
(nil)))
(insn 7 6 8 2 (set (reg:V1TI 104)
(mem/u/c:V1TI (symbol_ref/u:DI ("*.LC0") [flags 0x2]) [0  S16 A128]))
"/app/example.cpp":8:14 2132 {movv1ti_internal}
 (expr_list:REG_EQUAL (const_vector:V1TI [
(const_wide_int 0x0fff0)
])
(nil)))
(insn 8 7 9 2 (set (reg:V1TI 103 [ _3 ])
(and:V1TI (reg:V1TI 101 [ _2 ])
(reg:V1TI 104))) "/app/example.cpp":8:14 7213 {andv1ti3}
 (expr_list:REG_DEAD (reg:V1TI 104)
(expr_list:REG_DEAD (reg:V1TI 101 [ _2 ])
(nil


Confirmed.

  1   2   3   4   5   6   7   8   9   10   >