[Bug middle-end/120369] [15/16 Regression] internal compiler error: Segmentation fault during GIMPLE pass: cplxlower0 only in version 15.1 and trunk

2025-05-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120369

--- Comment #7 from GCC Commits  ---
The trunk branch has been updated by Andrew Pinski :

https://gcc.gnu.org/g:95c74f354ae3186e84fbada22d2e7f3845dbb659

commit r16-769-g95c74f354ae3186e84fbada22d2e7f3845dbb659
Author: Andrew Pinski 
Date:   Tue May 20 13:21:28 2025 -0700

middle-end: Fix complex lowering of cabs with no LHS [PR120369]

This was introduced by r15-1797-gd8fe4f05ef448e . I had missed that
the LHS of the cabs call could be NULL. This seems to only happen at -O0,
I tried to produce one that happens at -O1 but needed many different
options to prevent the removal of the call.
Anyways the fix is just keep around the call if the LHS is null.

Bootstrapped and tested on x86_64-linux-gnu.

PR middle-end/120369

gcc/ChangeLog:

* tree-complex.cc (gimple_expand_builtin_cabs): Return early
if the LHS of cabs is null.

gcc/testsuite/ChangeLog:

* gcc.dg/torture/pr120369-1.c: New test.

Signed-off-by: Andrew Pinski 

[Bug middle-end/120369] [15/16 Regression] internal compiler error: Segmentation fault during GIMPLE pass: cplxlower0 only in version 15.1 and trunk

2025-05-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120369

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug middle-end/120369] [15/16 Regression] internal compiler error: Segmentation fault during GIMPLE pass: cplxlower0 only in version 15.1 and trunk

2025-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120369

--- Comment #6 from Andrew Pinski  ---
Patch posted:
https://gcc.gnu.org/pipermail/gcc-patches/2025-May/684319.html

[Bug middle-end/120369] [15/16 Regression] internal compiler error: Segmentation fault during GIMPLE pass: cplxlower0 only in version 15.1 and trunk

2025-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120369

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

[Bug middle-end/120369] [15/16 Regression] internal compiler error: Segmentation fault during GIMPLE pass: cplxlower0 only in version 15.1 and trunk

2025-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120369

--- Comment #4 from Andrew Pinski  ---
I think I know the issue. it comes down to the LHS of __builtin_cabs is NULL.

[Bug middle-end/120369] [15/16 Regression] internal compiler error: Segmentation fault during GIMPLE pass: cplxlower0 only in version 15.1 and trunk

2025-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120369

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #3 from Andrew Pinski  ---
I am almost positive this is caused by r15-1798-ga17ce10c97fa1d or
r15-1797-gd8fe4f05ef448e .

Let me look into it then.

[Bug middle-end/120369] [15/16 Regression] internal compiler error: Segmentation fault during GIMPLE pass: cplxlower0 only in version 15.1 and trunk

2025-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120369

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |15.2

[Bug middle-end/120369] [15/16 Regression] internal compiler error: Segmentation fault during GIMPLE pass: cplxlower0 only in version 15.1 and trunk

2025-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120369

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2025-05-20
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

--- Comment #2 from Andrew Pinski  ---
  z_1 = COMPLEX_EXPR <1.0e+0, 0.0>;
   = 1.0e+0;

[Bug middle-end/120369] [15/16 Regression] internal compiler error: Segmentation fault during GIMPLE pass: cplxlower0 only in version 15.1 and trunk

2025-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120369

--- Comment #1 from Andrew Pinski  ---
Created attachment 61481
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61481&action=edit
No header version