[Bug tree-optimization/105165] Complex lowering does not handle asm goto with complex output; ICE in gimple_redirect_edge_and_branch, at tree-cfg.cc:6136

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105165

--- Comment #9 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Richard Biener
:

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

commit r11-9779-gd54cc1f43e53e52f52d1ae37f292b813e43d0b7b
Author: Richard Biener 
Date:   Wed Apr 6 13:46:56 2022 +0200

middle-end/105165 - sorry instead of ICE for _Complex asm goto

Complex lowering cannot currently deal with asm gotos with _Complex
output operands.  Emit a sorry instead of ICEing, those should not
appear in practice.

2022-04-06  Richard Biener  

PR middle-end/105165
* tree-complex.c (expand_complex_asm): Sorry for asm goto
_Complex outputs.

* gcc.dg/pr105165.c: New testcase.

(cherry picked from commit 54ed6563d22694aa3e1935f89641a4f696a3a9f7)

[Bug tree-optimization/105165] Complex lowering does not handle asm goto with complex output; ICE in gimple_redirect_edge_and_branch, at tree-cfg.cc:6136

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105165

Richard Biener  changed:

   What|Removed |Added

   Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot 
gnu.org
 Status|ASSIGNED|NEW
   Keywords|ice-on-valid-code   |rejects-valid

--- Comment #10 from Richard Biener  ---
Fixed - it's now a sorry() and thus rejects-valid, for future enhancement if a
real use comes up.

[Bug rtl-optimization/105192] New: ICE: in gen_reg_rtx, at emit-rtl.cc:1167 (during RTL pass: ce3) with -O -fno-if-conversion -fharden-compares

2022-04-07 Thread zsojka at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105192

Bug ID: 105192
   Summary: ICE: in gen_reg_rtx, at emit-rtl.cc:1167 (during RTL
pass: ce3) with -O -fno-if-conversion
-fharden-compares
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: mips64el-unknown-linux-gnuabi64

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

Maybe related to PR102478

Compiler output:
$ mips64el-unknown-linux-gnuabi64-gcc -O -fno-if-conversion -fharden-compares
testcase.c 
testcase.c: In function 'foo':
testcase.c:6:9: warning: division by zero [-Wdiv-by-zero]
6 |   b = a % 0 > 0;
  | ^
during RTL pass: ce3
testcase.c:7:1: internal compiler error: in gen_reg_rtx, at emit-rtl.cc:1167
7 | }
  | ^
0x617bec gen_reg_rtx(machine_mode)
/repo/gcc-trunk/gcc/emit-rtl.cc:1167
0xb25149 force_reg(machine_mode, rtx_def*)
/repo/gcc-trunk/gcc/explow.cc:677
0x12ac906 mips_expand_conditional_trap(rtx_def*)
/repo/gcc-trunk/gcc/config/mips/mips.cc:5815
0x16934d6 gen_ctrapsi4(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
/repo/gcc-trunk/gcc/config/mips/mips.md:1222
0xde84b9 rtx_insn* insn_gen_fn::operator()(rtx_def*, rtx_def*, rtx_def*, rtx_def*) const
/repo/gcc-trunk/gcc/recog.h:407
0xde84b9 gen_cond_trap(rtx_code, rtx_def*, rtx_def*, rtx_def*)
/repo/gcc-trunk/gcc/optabs.cc:5938
0x182645c find_cond_trap
/repo/gcc-trunk/gcc/ifcvt.cc:5076
0x182645c find_if_header
/repo/gcc-trunk/gcc/ifcvt.cc:4701
0x182645c if_convert
/repo/gcc-trunk/gcc/ifcvt.cc:5838
0x182724d execute
/repo/gcc-trunk/gcc/ifcvt.cc:5991
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.

$ mips64el-unknown-linux-gnuabi64-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-mips64el/bin/mips64el-unknown-linux-gnuabi64-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-8030-20220406184252-g61bee6aed26-checking-yes-rtl-df-extra-mips64el/bin/../libexec/gcc/mips64el-unknown-linux-gnuabi64/12.0.1/lto-wrapper
Target: mips64el-unknown-linux-gnuabi64
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl
--with-sysroot=/usr/mips64el-unknown-linux-gnuabi64 --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=mips64el-unknown-linux-gnuabi64
--with-ld=/usr/bin/mips64el-unknown-linux-gnuabi64-ld
--with-as=/usr/bin/mips64el-unknown-linux-gnuabi64-as --disable-multilib
--with-abi=64 --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-8030-20220406184252-g61bee6aed26-checking-yes-rtl-df-extra-mips64el
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220406 (experimental) (GCC)

[Bug target/105181] Store and load with updating the pointer is not used as often as it should be on aarch64

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105181

Richard Biener  changed:

   What|Removed |Added

Version|unknown |12.0

--- Comment #2 from Richard Biener  ---
So is it really a missed-optimization for the particular testcase?  Possibly
the decrement and test loop branch choice is?  If I correctly match subs + b.ne
as that.

[Bug fortran/105182] [11/12 Regression] compiling NJOY21 causes a ICE segmentation fault: 11

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

Richard Biener  changed:

   What|Removed |Added

  Known to work||10.3.0
   Target Milestone|--- |11.3
 Status|UNCONFIRMED |WAITING
   Keywords||ice-on-valid-code
  Known to fail||11.1.0, 11.2.0
Summary|compiling NJOY21 causes a   |[11/12 Regression]
   |ICE segmentation fault: 11  |compiling NJOY21 causes a
   ||ICE segmentation fault: 11
 Ever confirmed|0   |1
   Last reconfirmed||2022-04-07

--- Comment #9 from Richard Biener  ---
Can you collect the .f90 file exposing the issue plus all files required to
build imported modules and provide those as small testcase please?

It would also be helpful to see a backtrace of the faulting compiler.

[Bug fortran/105182] [11/12 Regression] compiling NJOY21 causes a ICE segmentation fault: 11

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4

[Bug testsuite/105183] New test case gcc.dg/ipa/remref-7.c fails with -m32

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105183

Richard Biener  changed:

   What|Removed |Added

 Target|powerpc64-linux-gnu |powerpc64-linux-gnu,
   ||i?86-*-*

--- Comment #1 from Richard Biener  ---
Also on i?86-*-* with -mno-sse

[Bug ipa/105185] [12 Regression] ICE in visit_reference_op_call, at tree-ssa-sccvn.cc:5144

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105185

Richard Biener  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Last reconfirmed||2022-04-07

--- Comment #1 from Richard Biener  ---
I will have a look.

[Bug c/105150] [9/10/11/12 Regression] ICE with -Ofast: verify_gimple failed

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105150

--- Comment #8 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:973a2ce71f8dab559fbbfc34b59e39e047df74a6

commit r12-8041-g973a2ce71f8dab559fbbfc34b59e39e047df74a6
Author: Jakub Jelinek 
Date:   Thu Apr 7 09:10:58 2022 +0200

tree.cc: Add tree_builtin_call_types_compatible_p [PR105150]

And here is the follow-up patch that does the argument checking
on GENERIC.  It ensures TYPE_MAIN_VARIANT == TYPE_MAIN_VARIANT
compatibility on the arguments, except for pointer arguments
where both builtin's prototype and actual arguments have to be
pointers and satisfy tree_nop_conversion_p, and for promoted
char/short arguments where argument need to have integral
signed type tree_nop_conversion_p compatible with integer_type_node.

2022-04-07  Jakub Jelinek  

PR tree-optimization/105150
* tree.cc (tree_builtin_call_types_compatible_p): New function.
(get_call_combined_fn): Use it.

* gcc.dg/pr105150.c: New test.

[Bug tree-optimization/102586] [12 Regression] ICE in clear_padding_type, at gimple-fold.c:4798 since r12-3433-ga25e0b5e6ac8a77a

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102586

--- Comment #30 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:46c739d40c6c1028295931c53cf414d581519072

commit r12-8042-g46c739d40c6c1028295931c53cf414d581519072
Author: Jakub Jelinek 
Date:   Thu Apr 7 09:14:07 2022 +0200

c++: Handle __builtin_clear_padding on non-trivially-copyable types
[PR102586]

On Fri, Feb 11, 2022 at 07:55:50PM +0100, Jakub Jelinek via Gcc-patches
wrote:
> Something like the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102586#c16
> will still be needed with adjusted testcase from
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102586#c15 such that
> __builtin_clear_padding is called directly on var addresses rather than
> in separate functions.

Here is an updated version of the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102586#c15
patch which uses FIELD_DECL in the langhook instead of its TREE_TYPE,
and the testcases have been adjusted for the builtin accepting
pointers to non-trivially-copyable types only if it is address of a
declaration.

2022-04-07  Jakub Jelinek  

PR tree-optimization/102586
gcc/
* langhooks.h (struct lang_hooks_for_types): Add classtype_as_base
langhook.
* langhooks-def.h (LANG_HOOKS_CLASSTYPE_AS_BASE): Define.
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Add it.
* gimple-fold.cc (clear_padding_type): Use ftype instead of
TREE_TYPE (field) some more.  For artificial FIELD_DECLs without
name try the lang_hooks.types.classtype_as_base langhook and
if it returns non-NULL, use that instead of ftype for recursive
call.
gcc/cp/
* cp-objcp-common.h (cp_classtype_as_base): Declare.
(LANG_HOOKS_CLASSTYPE_AS_BASE): Redefine.
* cp-objcp-common.cc (cp_classtype_as_base): New function.
gcc/testsuite/
* g++.dg/torture/builtin-clear-padding-5.C: New test.
* g++.dg/cpp2a/builtin-clear-padding1.C (bar): Uncomment one
call that is now accepted.

[Bug tree-optimization/102586] [12 Regression] ICE in clear_padding_type, at gimple-fold.c:4798 since r12-3433-ga25e0b5e6ac8a77a

2022-04-07 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102586

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #31 from Jakub Jelinek  ---
Now fixed.

[Bug c/105150] [9/10/11 Regression] ICE with -Ofast: verify_gimple failed

2022-04-07 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105150

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[9/10/11/12 Regression] ICE |[9/10/11 Regression] ICE
   |with -Ofast: verify_gimple  |with -Ofast: verify_gimple
   |failed  |failed

--- Comment #9 from Jakub Jelinek  ---
Fixed on the trunk so far.
I'd strongly prefer not to backport though.

[Bug c/105150] [9/10/11 Regression] ICE with -Ofast: verify_gimple failed

2022-04-07 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105150

--- Comment #10 from rguenther at suse dot de  ---
On Thu, 7 Apr 2022, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105150
> 
> Jakub Jelinek  changed:
> 
>What|Removed |Added
> 
> Summary|[9/10/11/12 Regression] ICE |[9/10/11 Regression] ICE
>|with -Ofast: verify_gimple  |with -Ofast: verify_gimple
>|failed  |failed
> 
> --- Comment #9 from Jakub Jelinek  ---
> Fixed on the trunk so far.
> I'd strongly prefer not to backport though.

Agreed unless it shows up in real-world code.

[Bug testsuite/105095] gcc.dg/vect/complex/fast-math-complex-* tests are not executed

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105095

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Tamar Christina :

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

commit r12-8044-gfdd81afcf18d1a926d81d63cc4525fc9442aa9a5
Author: Tamar Christina 
Date:   Thu Apr 7 08:26:36 2022 +0100

testsuite: enable fast-math-complex-* testcases.

As pointed out in PR105095 these tests weren't running, mainly because the
.exp
file contains a filter on the first character so it can distinguish between
fast-math-bb-slp-* and fast-math-*, my test started with `c` and so didn't
get
found.

This patch adds `c` to the list of filters and also updates the output and
required guards for the testcases now that they run.

gcc/testsuite/ChangeLog:

PR testsuite/105095
* gcc.dg/vect/complex/fast-math-complex-add-double.c: Update for
codegen.
* gcc.dg/vect/complex/fast-math-complex-add-float.c: Likewise.
* gcc.dg/vect/complex/fast-math-complex-add-half-float.c: Likewise.
* gcc.dg/vect/complex/fast-math-complex-add-pattern-double.c:
Likewise.
* gcc.dg/vect/complex/fast-math-complex-add-pattern-float.c:
Likewise.
* gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c:
Likewise.
* gcc.dg/vect/complex/fast-math-complex-mla-half-float.c: Likewise.
* gcc.dg/vect/complex/fast-math-complex-mls-double.c: Likewise.
* gcc.dg/vect/complex/fast-math-complex-mls-float.c: Likewise.
* gcc.dg/vect/complex/fast-math-complex-mls-half-float.c: Likewise.
* gcc.dg/vect/complex/fast-math-complex-mul-double.c: Likewise.
* gcc.dg/vect/complex/fast-math-complex-mul-float.c: Likewise.
* gcc.dg/vect/complex/fast-math-complex-mul-half-float.c: Likewise.
* gcc.dg/vect/vect.exp: Add extra letter to filter.

[Bug target/104049] [12 Regression] vec_select to subreg lowering causes superfluous moves

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104049

--- Comment #16 from CVS Commits  ---
The master branch has been updated by Tamar Christina :

https://gcc.gnu.org/g:024edf08959e9c1d5022901e6c4e5cbaa5b6c8d5

commit r12-8045-g024edf08959e9c1d5022901e6c4e5cbaa5b6c8d5
Author: Tamar Christina 
Date:   Thu Apr 7 08:27:53 2022 +0100

AArch64: Fix left fold sum reduction RTL patterns [PR104049]

As the discussion in the PR pointed out the RTL we have for the REDUC_PLUS
patterns are wrong.  The UNSPECs are modelled as returning a vector and
then
in an expand pattern we emit a vec_select of the 0th element to get the
scalar.

This is incorrect as the instruction itself already only returns a single
scalar
and by declaring it returns a vector it allows combine to push in a subreg
into
the pattern, which causes reload to make duplicate moves.

This patch corrects this by removing the weird indirection and making the
RTL
pattern model the correct semantics of the instruction immediately.

gcc/ChangeLog:

PR target/104049
* config/aarch64/aarch64-simd.md
(aarch64_reduc_plus_internal): Fix RTL and rename to...
(reduc_plus_scal_): ... This.
(reduc_plus_scal_v4sf): Moved.
(aarch64_reduc_plus_internalv2si): Fix RTL and rename to...
(reduc_plus_scal_v2si): ... This.

gcc/testsuite/ChangeLog:

PR target/104049
* gcc.target/aarch64/vadd_reduc-1.c: New test.
* gcc.target/aarch64/vadd_reduc-2.c: New test.

[Bug testsuite/105095] gcc.dg/vect/complex/fast-math-complex-* tests are not executed

2022-04-07 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105095

Tamar Christina  changed:

   What|Removed |Added

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

--- Comment #5 from Tamar Christina  ---
fixed, thanks!

[Bug target/104049] [12 Regression] vec_select to subreg lowering causes superfluous moves

2022-04-07 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104049

Tamar Christina  changed:

   What|Removed |Added

   Target Milestone|12.0|13.0
   Assignee|unassigned at gcc dot gnu.org  |tnfchris at gcc dot 
gnu.org
   Priority|P1  |P2

--- Comment #17 from Tamar Christina  ---
fixed the immediate regression will handle the general codegen issue in GCC 13

[Bug ipa/105185] [12 Regression] ICE in visit_reference_op_call, at tree-ssa-sccvn.cc:5144 since r12-7531-gdc46350d44c2949e

2022-04-07 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105185

Martin Liška  changed:

   What|Removed |Added

Summary|[12 Regression] ICE in  |[12 Regression] ICE in
   |visit_reference_op_call, at |visit_reference_op_call, at
   |tree-ssa-sccvn.cc:5144  |tree-ssa-sccvn.cc:5144
   ||since
   ||r12-7531-gdc46350d44c2949e

--- Comment #2 from Martin Liška  ---
Started with r12-7531-gdc46350d44c2949e.

[Bug middle-end/105188] ICE in rtl_verify_bb_pointers, at cfgrtl.cc:2829

2022-04-07 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105188

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org
 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #1 from Martin Liška  ---
Should be fixed after r12-7749-g6adbb51eaa85f5bf.

[Bug testsuite/105095] gcc.dg/vect/complex/fast-math-complex-* tests are not executed

2022-04-07 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105095

Eric Botcazou  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #6 from Eric Botcazou  ---
> fixed, thanks!

Not on the release branches though, which could be problematic when fixed are
backported.

[Bug ipa/105185] [12 Regression] ICE in visit_reference_op_call, at tree-ssa-sccvn.cc:5144 since r12-7531-gdc46350d44c2949e

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105185

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:27bfd13437c773a050f532ed164907de54b5a64f

commit r12-8046-g27bfd13437c773a050f532ed164907de54b5a64f
Author: Richard Biener 
Date:   Thu Apr 7 09:16:50 2022 +0200

tree-optimization/105185 - simplify modref query in SCCVN

This simplifies the modref query for calls in SCCVN again after
r12-8019-g4be08315124281, avoiding an ICE when the modref
analyzed access lacks an actual argument on the caller side.
It effectively reverts r12-7531-gdc46350d44c294.

2022-04-07  Richard Biener  

PR tree-optimization/105185
* tree-ssa-sccvn.cc (visit_reference_op_call): Simplify
modref query again.

* gcc.dg/torture/pr105185.c: New testcase.

[Bug ipa/105185] [12 Regression] ICE in visit_reference_op_call, at tree-ssa-sccvn.cc:5144 since r12-7531-gdc46350d44c2949e

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105185

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #4 from Richard Biener  ---
Fixed.

[Bug tree-optimization/104825] [12 Regression] ICE in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.cc:840

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104825
Bug 104825 depends on bug 105185, which changed state.

Bug 105185 Summary: [12 Regression] ICE in visit_reference_op_call, at 
tree-ssa-sccvn.cc:5144 since r12-7531-gdc46350d44c2949e
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105185

   What|Removed |Added

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

[Bug testsuite/105095] gcc.dg/vect/complex/fast-math-complex-* tests are not executed

2022-04-07 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105095

--- Comment #7 from Eric Botcazou  ---
> Not on the release branches though, which could be problematic when fixed
> are backported.

Only the gcc-11 branch is affected though.

[Bug tree-optimization/104582] [11 Regression] Unoptimal code for __negdi2 (and others) from libgcc2 due to unwanted vectorization

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104582

--- Comment #23 from Richard Biener  ---
I do not plan to backport this given it's quite intrusive and had some fallout.

[Bug target/102146] [11 regression] several test cases fails after r11-8940

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102146

Richard Biener  changed:

   What|Removed |Added

   Keywords||testsuite-fail

--- Comment #2 from Richard Biener  ---
What's the status on the remaining failures?

[Bug jit/65884] libgccjit fails to link on ia64-linux-gnu

2022-04-07 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65884

--- Comment #3 from Sergei Trofimovich  ---
Created attachment 52765
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52765&action=edit
ia64-disable-sdata-by-default.patch

We can try a radical thing: make -mno-sdata a default:
ia64-disable-sdata-by-default.patch . That allows me to link libgccjit on ia64
cross-compiler.

It might break boot loader, kernel and glibc. Worth a test on real hardware.

[Bug jit/65884] libgccjit fails to link on ia64-linux-gnu

2022-04-07 Thread glaubitz at physik dot fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65884

--- Comment #4 from John Paul Adrian Glaubitz  ---
(In reply to Sergei Trofimovich from comment #3)
> Created attachment 52765 [details]
> ia64-disable-sdata-by-default.patch
> 
> We can try a radical thing: make -mno-sdata a default:
> ia64-disable-sdata-by-default.patch . That allows me to link libgccjit on
> ia64 cross-compiler.

I'll give it a try.

> It might break boot loader, kernel and glibc. Worth a test on real hardware.

Oh, that would be a dealbreaker :D. I'll test that as well.

[Bug c++/104476] [11 Regression] using-decl shadowed by member function when in incomplete-class context

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104476

Richard Biener  changed:

   What|Removed |Added

  Known to fail||11.1.0
   Priority|P1  |P2

--- Comment #8 from Richard Biener  ---
Reverted on the 10 branch, P2 on the 11 branch.

[Bug c++/59716] [10/11 Regression] variadic template multiple parameter pack expansion fails

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59716

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug target/105162] [AArch64] outline-atomics drops dmb ish barrier on __sync builtins

2022-04-07 Thread ktkachov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105162

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ktkachov at gcc dot gnu.org

--- Comment #6 from ktkachov at gcc dot gnu.org ---
Can you please send the patch to gcc-patches for review. It'll get more eyes
there

[Bug target/102146] [11 regression] several test cases fails after r11-8940

2022-04-07 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102146

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
Looking at my 6 days old powerpc64le-linux testresults, I see from
gcc.target/powerpc/ FAILures
FAIL: gcc.target/powerpc/compress-float-ppc-pic.c scan-assembler lfs
FAIL: gcc.target/powerpc/compress-float-ppc.c scan-assembler lfs
FAIL: gcc.target/powerpc/fusion-p10-stst.c scan-assembler-times std
4,8(3)ntstd 6,16(3) 1
FAIL: gcc.target/powerpc/fusion-p10-stst.c scan-assembler-times stfd
1,8(3)ntstfd 3,16(3) 1
FAIL: gcc.target/powerpc/fusion-p10-stst.c scan-assembler-times stw
4,4(3)ntstw 6,8(3) 1
FAIL: gcc.target/powerpc/lhs-1.c scan-assembler-times nop 3
FAIL: gcc.target/powerpc/lhs-2.c scan-assembler ori 1,1,0
FAIL: gcc.target/powerpc/pr56605.c scan-rtl-dump-times combine "(compare:CC
((?:and|zero_extend):(?:DI) ((?:sub)?reg:[SD]I" 1
FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times mlwzM
2
FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times mplwzM
2
FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times mpstwM
2
FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times mstwM
2
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
FAIL: gcc.target/powerpc/rs6000-fpint.c scan-assembler-not stfiwx

Comparing with GCC 11.1.0 results, that is
+FAIL: gcc.target/powerpc/fusion-p10-stst.c scan-assembler-times std
4,8(3)ntstd 6,16(3) 1
+FAIL: gcc.target/powerpc/fusion-p10-stst.c scan-assembler-times stfd
1,8(3)ntstfd 3,16(3) 1
+FAIL: gcc.target/powerpc/fusion-p10-stst.c scan-assembler-times stw
4,4(3)ntstw 6,8(3) 1
+FAIL: gcc.target/powerpc/pr56605.c scan-rtl-dump-times combine
"(compare:CC ((?:and|zero_extend):(?:DI) ((?:sub)?reg:[SD]I" 1
+FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times mlwzM
2
+FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times
mplwzM 2
+FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times
mpstwM 2
+FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times mstwM
2
regression.

[Bug rtl-optimization/105023] new test case g++.dg/other/pr104989.C ICEs

2022-04-07 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105023

Jiu Fu Guo  changed:

   What|Removed |Added

 CC||guojiufu at gcc dot gnu.org

--- Comment #7 from Jiu Fu Guo  ---
This would already been fixed via r12-7833
(41d1f11f5f693a2a06c65c9467a28dfeb02aed85).

With this patch, the call is:
(call_insn/u/c 23 22 0 (parallel [
(call (mem:SI (symbol_ref:DI ("_Z1cz") [flags 0x3]  ) [0 c S4 A8])
(const_int 2305843009213693952 [0x2000]))
(use (const_int 0 [0]))
(clobber (reg:DI 96 lr))
]) "/home/guojiufu/temp/pr104989.C":8:16 -1
 (expr_list:REG_CALL_DECL (symbol_ref:DI ("_Z1cz") [flags 0x3] 
)
(expr_list:REG_EH_REGION (const_int 0 [0])
(nil)))
(expr_list (use (reg:DI 2 %r2))
(expr_list (use (reg:DI 10 %r10))
(expr_list (use (reg:DI 9 %r9))
(expr_list (use (reg:DI 8 %r8))
(expr_list (use (reg:DI 7 %r7))
(expr_list (use (reg:DI 6 %r6))
(expr_list (use (reg:DI 5 %r5))
(expr_list (use (reg:DI 4 %r4))
(expr_list (use (reg:DI 3 %r3))
(expr_list:BLK (use (mem:BLK (reg/f:DI
114 virtual-outgoing-args) [0  S2305843009213693952 A128]))
(nil

[Bug middle-end/104880] [11 Regression] ICE in expand_expr_addr_expr_1, at expr.c:8231 since r11-165-geb72dc663e9070

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104880

--- Comment #5 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Richard Biener
:

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

commit r11-9780-gcf6c812718673cbf89bb96fb2427ee9923bf2a90
Author: Richard Biener 
Date:   Fri Mar 11 14:09:33 2022 +0100

tree-optimization/104880 - update-address-taken and cmpxchg

The following addresses optimistic non-addressable marking of
an argument of __atomic_compare_exchange_n which broke when
I added DECL_NOT_GIMPLE_REG_P since we cannot guarantee we can
rewrite it when TREE_ADDRESSABLE is unset.  Instead we have to
restore TREE_ADDRESSABLE in that case.

2022-03-11  Richard Biener  

PR tree-optimization/104880
* tree-ssa.c (execute_update_address_taken): Remember if we
optimistically made something not addressable and
prepare to undo it.

* g++.dg/opt/pr104880.cc: New testcase.

(cherry picked from commit eb5edcf3f3ae008a1c55c88f08a886a5f350a759)

[Bug middle-end/105028] [11 Regression] gcc.dg/long_branch.c compilation time increases by 10x on BE system after r11-5648

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105028

--- Comment #6 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Richard Biener
:

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

commit r11-9781-gb3eb889978c6a28961511bd70f3cc177df54fde7
Author: Richard Biener 
Date:   Wed Mar 23 12:21:32 2022 +0100

rtl-optimization/105028 - fix compile-time hog in form_threads_from_copies

form_threads_from_copies processes a sorted array of copies, skipping
those with the same thread and conflicting threads and merging the
first non-conflicting ones.  After that it terminates the loop and
gathers the remaining elements of the array, skipping same thread
copies, re-starting the process.  For a large number of copies this
gathering of the rest takes considerable time and it also appears
pointless.  The following simply continues processing the array
which should be equivalent as far as I can see.

This takes form_threads_from_copies off the profile radar from
previously taking ~50% of the compile-time.

2022-03-23  Richard Biener  

PR rtl-optimization/105028
* ira-color.c (form_threads_from_copies): Remove unnecessary
copying of the sorted_copies tail.

(cherry picked from commit 1daa198aafd72925ca8dd8616385f523ff180d4a)

[Bug debug/105070] [9/10/11 Regression] Missing debug info for switch statement

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105070

--- Comment #4 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:57b62cd299a0ec257141349a114e52f7233be67b

commit r11-9782-g57b62cd299a0ec257141349a114e52f7233be67b
Author: Richard Biener 
Date:   Mon Mar 28 10:07:53 2022 +0200

tree-optimization/105070 - annotate bit cluster tests with locations

The following makes sure to annotate the tests generated by
switch lowering bit-clustering with locations which otherwise
can be completely lost even at -O0.

2022-03-28  Richard Biener  

PR tree-optimization/105070
* tree-switch-conversion.h
(bit_test_cluster::hoist_edge_and_branch_if_true): Add location
argument.
* tree-switch-conversion.c
(bit_test_cluster::hoist_edge_and_branch_if_true): Annotate
cond with location.
(bit_test_cluster::emit): Annotate all generated expressions
with location.

(cherry picked from commit bc86a86a4f2c057bc0e0be94dcbb8c128ae7f717)

[Bug middle-end/104880] [11 Regression] ICE in expand_expr_addr_expr_1, at expr.c:8231 since r11-165-geb72dc663e9070

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104880

Richard Biener  changed:

   What|Removed |Added

  Known to fail||11.2.0
 Resolution|--- |FIXED
  Known to work||11.2.1
 Status|ASSIGNED|RESOLVED

--- Comment #6 from Richard Biener  ---
Fixed.

[Bug middle-end/105028] [11 Regression] gcc.dg/long_branch.c compilation time increases by 10x on BE system after r11-5648

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105028

Richard Biener  changed:

   What|Removed |Added

  Known to fail||11.2.0
 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #7 from Richard Biener  ---
Fixed.

[Bug tree-optimization/105189] [9/10/11/12 Regression] Wrong code with -O1

2022-04-07 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105189

--- Comment #3 from Jakub Jelinek  ---
I think the bug is in make_range_step.
When we see
(unsigned) foo () >= 0U, first make_range_step determines +[0U, -] range
for (unsigned) foo (), that is correct (though equivalent to +[-, -] aka always
true).
But then we handle the NOP_EXPR in another make_range_step call, exp_type is
unsigned int, arg0_type is int.  There is code that handles signed exp_type and
unsigned arg0_type and we punt when arg0_type is not integral, or has higher
precision than exp_type (i.e. narrowing conversion) or if either of the bounds
(if specified) doesn't fit into arg0_type.
None of that is the case here, so we incorrectly change the range to
foo () +[0, -] (but e.g. (unsigned) foo () +[-, -] would be handled correctly
as foo () +[-, -]).
At least for the TYPE_PRECISION equal case, the unsigned exp_type signed
arg0_type case is IMHO valid as is only if high is non-NULL or both low and
high are NULL (if high is non-NULL and higher than signed maximum, we already
punt), because if high is NULL, the range includes the largest unsigned value,
which is -1 in signed and when low is non-NULL, it is necessarily [0,
largest_signed].

[Bug target/103938] [9/10/11/12 Regression] ICE with __builtin_prefetch and vectors

2022-04-07 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103938

--- Comment #6 from Alex Coplan  ---
(In reply to Andrew Pinski from comment #5)
> (In reply to Alex Coplan from comment #4)
> > Confirmed on trunk. I can only reproduce the ICE with trunk, not with
> > earlier released versions.
> 
> Are you sure you configured the previous released versions with
> --enabled-checking=yes ? That is the only way to get the ICE on released
> versions.

Well, I just tried a clean build of the GCC 11 branch with
--enable-checking=yes, and I don't see the ICE there:

$ gcc/xgcc -B gcc -v
Reading specs from gcc/specs
COLLECT_GCC=gcc/xgcc
COLLECT_LTO_WRAPPER=gcc/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/alecop01/toolchain/src/gcc/configure
--prefix=/data_sdb/toolchain/cc1s/gcc11-aarch64 --enable-languages=c,c++
--disable-bootstrap --target=aarch64-linux-gnu --enable-checking=yes
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.1 20220407 (GCC)
$ cat t.c
typedef unsigned long u64x2 __attribute__ ((vector_size(16)));
void g (u64x2 off)
{
  __builtin_prefetch ((void*)off[0], 0, 3);
}
$ gcc/xgcc -B gcc -c t.c -O2

[Bug c++/59716] [10/11 Regression] variadic template multiple parameter pack expansion fails

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59716

--- Comment #8 from Richard Biener  ---
Patrick, is the bug you fixed and that fixed this testcase a duplicate and thus
a regression?

[Bug c++/99699] Type deduction failure for deducing a non-type template parameter via another deducible structural type (class template specialization) non-type template parameter

2022-04-07 Thread davveston at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99699

--- Comment #1 from David Friberg  ---
This seems to have been fixed on trunk/GCC 12:
https://wandbox.org/permlink/qq207mBL7q5ndRgS

[Bug target/90524] [10/11 Regression] attribute name and argument mixed up in an error message

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90524

Richard Biener  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #6 from Richard Biener  ---
You fixed this appearantly, maybe you want to backport it.

[Bug tree-optimization/94905] [10/11 Regression] Bogus warning -Werror=maybe-uninitialized

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Richard Biener  changed:

   What|Removed |Added

   Keywords||needs-bisection

--- Comment #15 from Richard Biener  ---
(In reply to Martin Liška from comment #14)
> > 
> > and the partial uninitialized read from it is not what the uninit pass can
> > diagnose (it's memory walking stops at the first may-def, it does not
> > prune must-def ranges).  But even with -fno-tree-loop-distribute-patterns
> > -fno-tree-vectorize where we get similar IL as with GCC 11 we do not warn so
> > I wonder
> > what fixed it on trunk (when you add those options).
> 
> It was fixed with r11-3659-gac1c65ad1a16d83e.

But the original testcase still warns on the branch but not trunk, so that
cannot be it.

[Bug ipa/105193] New: Code divergence based on -fdump-tree-* since r9-5080-gf7293b9dfab5e6e7

2022-04-07 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105193

Bug ID: 105193
   Summary: Code divergence based on -fdump-tree-* since
r9-5080-gf7293b9dfab5e6e7
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: hubicka at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

The following code diverges:

$ cat NodeImpl.ii
struct NodeImpl {
  virtual bool isAttrImpl();
  void deleteIf();
  virtual int getOwnerDocument();
  void unreferenced();
  bool isOwned();
};
struct AttrImpl : NodeImpl {
  bool isAttrImpl();
};
bool NodeImpl::isAttrImpl() { return false; }
NodeImpl *deleteIf_thisNode;
void NodeImpl::deleteIf() {
  if (isOwned())
return;
  isAttrImpl();
  ((AttrImpl *)deleteIf_thisNode)->getOwnerDocument();
}
void NodeImpl::unreferenced() { deleteIf(); }

$ g++ -O2 NodeImpl.ii -c -S -o 1.s -fdump-tree-all=/dev/null && g++ -O2
NodeImpl.ii -c -S -o 2.s && diff -u [12].s
--- 1.s 2022-04-07 11:43:05.995744783 +0200
+++ 2.s 2022-04-07 11:43:06.023744659 +0200
@@ -27,8 +27,10 @@
testb   %al, %al
jne .L3
movq0(%rbp), %rax
-   movq%rbp, %rdi
-   call*(%rax)
+   movq(%rax), %rax
+   cmpq$_ZN8NodeImpl10isAttrImplEv, %rax
+   jne .L10
+.L5:
movqdeleteIf_thisNode(%rip), %rdi
popq%rbp
.cfi_remember_state
@@ -41,8 +43,16 @@
 .L3:
.cfi_restore_state
popq%rbp
+   .cfi_remember_state
.cfi_def_cfa_offset 8
ret
+   .p2align 4,,10
+   .p2align 3
+.L10:
+   .cfi_restore_state
+   movq%rbp, %rdi
+   call*%rax
+   jmp .L5
.cfi_endproc
 .LFE1:
.size   _ZN8NodeImpl8deleteIfEv, .-_ZN8NodeImpl8deleteIfEv

[Bug ipa/105193] Code divergence based on -fdump-tree-* since r9-5080-gf7293b9dfab5e6e7

2022-04-07 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105193

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2022-04-07
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
It's speculative devirtualization that plays the role:

$ g++ -O2 NodeImpl.ii -c -S -o 1.s -fdump-tree-all=/dev/null
-fdump-tree-optimized=1 && g++ -O2 NodeImpl.ii -c -S -o 2.s
-fdump-tree-optimized=2 && diff -u 1 2
--- 1   2022-04-07 11:43:51.739540416 +0200
+++ 2   2022-04-07 11:43:51.767540290 +0200
@@ -12,7 +12,8 @@

 ;; Function NodeImpl::deleteIf (_ZN8NodeImpl8deleteIfEv, funcdef_no=1,
decl_uid=2352, cgraph_uid=2, symbol_order=2)

-Removing basic block 5
+Removing basic block 7
+Removing basic block 8
 void NodeImpl::deleteIf (struct NodeImpl * const this)
 {
   bool _6;
@@ -22,25 +23,35 @@
   struct NodeImpl * _10;
   int (*) () * _11;
   int (*) () _12;
+  void * PROF_13;

[local count: 1073741824]:
   _6 = NodeImpl::isOwned (this_4(D));
   if (_6 != 0)
-goto ; [34.00%]
+goto ; [34.00%]
   else
 goto ; [66.00%]

[local count: 708669601]:
   _7 = this_4(D)->_vptr.NodeImpl;
   _8 = *_7;
+  PROF_13 = [obj_type_ref] OBJ_TYPE_REF(_8;(struct NodeImpl)this_4(D)->0);
+  if (PROF_13 == isAttrImpl)
+goto ; [80.00%]
+  else
+goto ; [20.00%]
+
+   [local count: 141733922]:
   OBJ_TYPE_REF(_8;(struct NodeImpl)this_4(D)->0) (this_4(D));
+
+   [local count: 708669601]:
   deleteIf_thisNode.1_9 = deleteIf_thisNode;
   _10 = &MEM[(struct AttrImpl *)deleteIf_thisNode.1_9].D.2378;
   _11 = MEM[(struct AttrImpl *)deleteIf_thisNode.1_9].D.2378._vptr.NodeImpl;
   _12 = MEM[(int (*) () *)_11 + 8B];
   OBJ_TYPE_REF(_12;(struct NodeImpl)_10->1) (_10); [tail call]

-   [local count: 1073741824]:
+   [local count: 1073741824]:
   return;

 }

[Bug tree-optimization/105189] [9/10/11/12 Regression] Wrong code with -O1

2022-04-07 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105189

--- Comment #4 from Jakub Jelinek  ---
Created attachment 52766
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52766&action=edit
gcc12-pr105189.patch

Untested fix.

[Bug tree-optimization/100740] [9/10/11 Regression] wrong code at -O1 and above on x86_64-linux-gnu since r9-4145-ga81e2c6240655f60

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100740

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|amker at gcc dot gnu.org   |rguenth at gcc dot 
gnu.org

[Bug testsuite/101528] [11 regression] gcc.target/powerpc/int_128bit-runnable.c fails after r11-8743

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101528

Richard Biener  changed:

   What|Removed |Added

  Known to fail||11.2.0
   Priority|P3  |P2

--- Comment #2 from Richard Biener  ---
is this still broken?

[Bug target/104474] [10/11 Regression] ICE: in output_constant_pool_2, at varasm.cc:4062 with -mcpu=neoverse-512tvb -msve-vector-bits=512

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104474

--- Comment #7 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Richard Biener
:

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

commit r11-9783-gb8a6fb4b5919140de74fbc6ad6df1a9caba1c9ec
Author: Andrew Pinski 
Date:   Wed Feb 9 14:56:58 2022 -0800

[COMMITTED] Fix PR aarch64/104474: ICE with vector float initializers and
non-consts.

The problem here is that the aarch64 back-end was placing const0_rtx
into the constant vector RTL even if the mode was a floating point mode.
The fix is instead to use CONST0_RTX and pass the mode to select the
correct zero (either const_int or const_double).

Committed as obvious after a bootstrap/test on aarch64-linux-gnu with
no regressions.

PR target/104474

gcc/ChangeLog:

* config/aarch64/aarch64.c
(aarch64_sve_expand_vector_init_handle_trailing_constants):
Use CONST0_RTX instead of const0_rtx for the non-constant elements.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve/pr104474-1.c: New test.
* gcc.target/aarch64/sve/pr104474-2.c: New test.
* gcc.target/aarch64/sve/pr104474-3.c: New test.

(cherry picked from commit 41582f88ec01c5ce2f85ebc4ac2743eb426d6e33)

[Bug tree-optimization/105053] [11 Regression] Wrong loop count for scalar code from vectorizer

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105053

--- Comment #10 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:825151e16373760527678df8ad524bd725e36c7b

commit r11-9784-g825151e16373760527678df8ad524bd725e36c7b
Author: Richard Biener 
Date:   Fri Mar 25 14:31:25 2022 +0100

tree-optimization/105053 - fix reduction chain epilogue generation

When we optimize permutations in a reduction chain we have to
be careful to select the correct live-out stmt, otherwise the
reduction result will be unused and the retained scalar code will
execute only the number of vector iterations.

2022-03-25  Richard Biener  

PR tree-optimization/105053
* tree-vect-loop.c (vect_create_epilog_for_reduction): Pick
the correct live-out stmt for a reduction chain.

* g++.dg/vect/pr105053.cc: New testcase.

[Bug tree-optimization/104497] [11 Regression] Invalid gimple produced for (A?vect:vect)[i]

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104497

--- Comment #10 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Richard Biener
:

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

commit r11-9785-gd34083a16b51c85b49092b0a5d9d444750f32134
Author: Richard Biener 
Date:   Fri Feb 11 11:08:57 2022 +0100

middle-end/104497 - gimplification of vector indexing

The following attempts to address gimplification of

   ... = VIEW_CONVERT_EXPR((i & 1) != 0 ? inv : src)[i];

which is problematic since gimplifying the base object
? inv : src produces a register temporary but GIMPLE does not
really support a register as a base for an ARRAY_REF (even
though that's not strictly validated it seems as can be seen
at -O0).  Interestingly the C++ frontend avoids this issue
by emitting the following GENERIC instead:

   ... = (i & 1) != 0 ? VIEW_CONVERT_EXPR(inv)[i] :
VIEW_CONVERT_EXPR(src)[i];

The proposed patch below fixes things up when using an rvalue
as the base is OK by emitting a copy from a register base to a
non-register one.  The ?: as lvalue extension seems to be gone
for C, C++ again unwraps the COND_EXPR in that case.

2022-02-11  Richard Biener  

PR middle-end/104497
* gimplify.c (gimplify_compound_lval): Make sure the
base is a non-register if needed and possible.

* c-c++-common/torture/pr104497.c: New testcase.

[Bug tree-optimization/104497] [11 Regression] Invalid gimple produced for (A?vect:vect)[i]

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104497

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
  Known to work||11.2.1

--- Comment #11 from Richard Biener  ---
Fixed.

[Bug tree-optimization/105053] [11 Regression] Wrong loop count for scalar code from vectorizer

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105053

Richard Biener  changed:

   What|Removed |Added

  Known to work||11.2.1
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Richard Biener  ---
Should be fixed in GCC 11 as well now (but the code is quite different there).

[Bug tree-optimization/94905] [10/11 Regression] Bogus warning -Werror=maybe-uninitialized

2022-04-07 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #16 from Jakub Jelinek  ---
On the trunk it stopped with r12-4240-g2b8453c401b699ed93c085d0413ab4b5030bcdb8
But with -O2 -W -Wall fno-tree-vectorize it still warns even with current
trunk.

[Bug target/104409] [12 Regression] -march=armv8.6-a+ls64 crashes, LS64 builtins causes ICE

2022-04-07 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104409

Tamar Christina  changed:

   What|Removed |Added

Summary|-march=armv8.6-a+ls64   |[12 Regression]
   |crashes, LS64 builtins  |-march=armv8.6-a+ls64
   |causes ICE  |crashes, LS64 builtins
   ||causes ICE
   Assignee|wirkus at gcc dot gnu.org  |tnfchris at gcc dot 
gnu.org
   Priority|P3  |P1
 CC||tnfchris at gcc dot gnu.org
   Target Milestone|--- |12.0

--- Comment #8 from Tamar Christina  ---
Testing patch.

[Bug libstdc++/103630] [9/10/11 Regression] std::make_exception_ptr(t) is ill-formed

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103630

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug libstdc++/103638] [11 Regression] #include gives errors for --disable-threads builds

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103638

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/103885] [9/10/11 Regression] ICE in capturing lambda for certain constexpr/auto combination

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103885

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug libstdc++/104859] [11 Regression] libg++ fails during bootstrap

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104859

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug jit/65884] libgccjit fails to link on ia64-linux-gnu

2022-04-07 Thread glaubitz at physik dot fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65884

--- Comment #5 from John Paul Adrian Glaubitz  ---
(In reply to John Paul Adrian Glaubitz from comment #4)
> (In reply to Sergei Trofimovich from comment #3)
> > Created attachment 52765 [details]
> > ia64-disable-sdata-by-default.patch
> > 
> > We can try a radical thing: make -mno-sdata a default:
> > ia64-disable-sdata-by-default.patch . That allows me to link libgccjit on
> > ia64 cross-compiler.
> 
> I'll give it a try.

By the way, wouldn't it be possible to patch the GCC sources so that just
libgccjit is built with -mno-sdata?

[Bug debug/105194] New: -ftree-dce leads to intermittent visibility of variable due to partial DWARF location ranges

2022-04-07 Thread dc.delia at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105194

Bug ID: 105194
   Summary: -ftree-dce leads to intermittent visibility of
variable due to partial DWARF location ranges
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dc.delia at protonmail dot com
  Target Milestone: ---

When debugging this code, the value of variable l_33 is available when stepping
on line 8 and 10 but appears as optimized out on line 9. We tested and found
the issue at -Og/-O1/-O2/-O3.

Apparently, with -ftree-dce we get DWARF location info for l_33 that does not
include the address of the instruction mapped to line 9. By disabling it,
instead of a location attribute we see in DWARF a const value 1 for l_33 set
(as in the reassignment at line 9 the program compares a boolean expression
against 0), which makes the variable value always available.

We found this issue on x64 using gdb 11.2 with gcc commit 500d3f0a302. As for
past gcc versions, the issue is found in gcc 9/10/11 (we tested 9.3, 10.3,
11.1) but not in 6/7/8 (6.4, 7.5, 8.4). Attaching an analysis for -Og below:

$ cat a.c
short a;
int b;
char c(int d) { return 0; }
char e(int d) { return d; }
void f(int d) {
  int l_33 = 1;
  for (;;) {
b = e(l_33);
l_33 = a = (d || c(l_33 = 0)) >= 0;
if (b)
  break;
  }
}
int main() { f(4); }


GDB trace:
$ gcc -Og -g a.c -o opt
$ gdb -q
Reading symbols from opt...
(gdb) b f
Breakpoint 1 at 0x40048f: file a.c, line 8.
(gdb) r   
Starting program: /tmp/opt 

Breakpoint 1, f (d=4) at a.c:8
8   b = e(l_33);
(gdb) info loc
l_33 = 1
(gdb) n
9   l_33 = a = (d || c(l_33 = 0)) >= 0;
(gdb) info loc
l_33 = 
(gdb) n
10  if (b)
(gdb) info loc
l_33 = 1


Code at -Og:
0040048f :
  40048f:   bf 01 00 00 00  mov$0x1,%edi
  400494:   e8 f3 ff ff ff  callq  40048c 
  400499:   0f be c0movsbl %al,%eax
  40049c:   89 05 8a 0b 20 00   mov%eax,0x200b8a(%rip)#
60102c 
  4004a2:   66 c7 05 85 0b 20 00movw   $0x1,0x200b85(%rip)#
601030 
  4004a9:   01 00 
  4004ab:   85 c0   test   %eax,%eax
  4004ad:   74 e0   je 40048f 
  4004af:   c3  retq


DWARF info at -Og:
0x00c6: DW_TAG_variable
  DW_AT_name("l_33")
  DW_AT_decl_file   ("/tmp/a.c")
  DW_AT_decl_line   (6)
  DW_AT_decl_column (0x07)
  DW_AT_type(0x005b "int")
  DW_AT_location(0x001b: 
 [0x0040048f, 0x004004a2): DW_OP_lit1,
DW_OP_stack_value
 [0x004004ab, 0x004004b0): DW_OP_lit1,
DW_OP_stack_value)
  DW_AT_GNU_locviews(0x0017)


The transformation behind the issue may be -ftree-dce. If we add -fno-tree-dce
to the compilation command line, the value of variable l_33 is correctly shown
at line 9. In particular, the DWARF location info is not generated but a const
value attribute is emmitted.

Code at -Og with -fno-tree-dce:
0040048f :
  40048f:   55  push   %rbp
  400490:   53  push   %rbx
  400491:   89 fd   mov%edi,%ebp
  400493:   bf 01 00 00 00  mov$0x1,%edi
  400498:   e8 ef ff ff ff  callq  40048c 
  40049d:   0f be d8movsbl %al,%ebx
  4004a0:   89 1d 86 0b 20 00   mov%ebx,0x200b86(%rip)#
60102c 
  4004a6:   85 ed   test   %ebp,%ebp
  4004a8:   66 c7 05 7f 0b 20 00movw   $0x1,0x200b7f(%rip)#
601030 
  4004af:   01 00 
  4004b1:   85 db   test   %ebx,%ebx
  4004b3:   74 de   je 400493 
  4004b5:   5b  pop%rbx
  4004b6:   5d  pop%rbp
  4004b7:   c3  retq


DWARF info at -Og with -fno-tree-dce:
0x00c6: DW_TAG_variable
  DW_AT_name("l_33")
  DW_AT_decl_file   ("/tmp/a.c")
  DW_AT_decl_line   (6)
  DW_AT_decl_column (0x07)
  DW_AT_type(0x005b "int")
  DW_AT_const_value (0x01)

[Bug target/100106] [10/11 Regression] ICE in gen_movdi, at config/arm/arm.md:6187 since r10-2840-g70cdb21e

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100106

--- Comment #7 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:5155015ce57dc133e006f87fdf0237a5f259bebd

commit r11-9786-g5155015ce57dc133e006f87fdf0237a5f259bebd
Author: Bernd Edlinger 
Date:   Wed Apr 21 14:13:04 2021 +0200

Fix target/100106 ICE in gen_movdi

As the test case shows, the outer mode may have a higher alignment
requirement than the inner mode here.

2021-04-27  Bernd Edlinger  

PR target/100106
* simplify-rtx.c (simplify_context::simplify_subreg): Check the
memory alignment for the outer mode.

* gcc.c-torture/compile/pr100106.c: New testcase.

(cherry picked from commit c33db31d9ad96f6414460315c12b4b505fad5dd7)

[Bug tree-optimization/99121] [9/10/11 Regression] ICE tree check: expected integer_cst, have var_decl in get_len, at tree.h:6037

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99121

--- Comment #10 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:4662984506b774213df9c4429d2c59664bb09adc

commit r11-9787-g4662984506b774213df9c4429d2c59664bb09adc
Author: Richard Biener 
Date:   Thu Apr 7 11:59:04 2022 +0200

tree-optimization/99121 - avoid ICEing for non-constant sizes

The following is a simple fix to avoid ICEing on non-constant
sizes of ARRAY_REFs instead of backporting too intrusive changes
done on trunk.

2022-04-07  Richard Biener  

PR tree-optimization/99121
* gimple-array-bounds.cc (array_bounds_checker::check_mem_ref):
Bail out for non-constant type size.

[Bug c/101585] [11 Regression] Bad interaction of -fsanitize=undefined and -Wvla-parameters

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101585

--- Comment #5 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:5446b933bc1e9449aa408eb66c31b6fcdbe74214

commit r11-9788-g5446b933bc1e9449aa408eb66c31b6fcdbe74214
Author: Martin Sebor 
Date:   Tue Jul 27 13:51:55 2021 -0600

Use OEP_DECL_NAME when comparing VLA bounds [PR101585].

Resolves:
PR c/101585 - Bad interaction of -fsanitize=undefined and -Wvla-parameters

gcc/c-family:

PR c/101585
* c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.

gcc/testsuite:
PR c/101585
* gcc.dg/Wvla-parameter-13.c: New test.

(cherry picked from commit a0f9a5dcc3bbe6c7de499e17d201d0f2cb512649)

[Bug c/101585] [11 Regression] Bad interaction of -fsanitize=undefined and -Wvla-parameters

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101585

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #6 from Richard Biener  ---
Fixed.

[Bug c/101604] [meta-bug] bogus/missing -Wvla-parameter

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101604
Bug 101604 depends on bug 101585, which changed state.

Bug 101585 Summary: [11 Regression] Bad interaction of -fsanitize=undefined and 
-Wvla-parameters
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101585

   What|Removed |Added

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

[Bug target/90524] [10/11 Regression] attribute name and argument mixed up in an error message

2022-04-07 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90524

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #7 from Martin Liška  ---
No, I don't want to backport it, it's not so important.

[Bug c/105149] [9/10/11/12 Regression] ICE in verify_ssa, at tree-ssa.cc:1211

2022-04-07 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105149

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #8 from Jakub Jelinek  ---
Created attachment 52767
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52767&action=edit
gcc12-pr105149.patch

Untested patch to reject it.

[Bug target/90524] [10/11 Regression] attribute name and argument mixed up in an error message

2022-04-07 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90524

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|10.4|12.0
  Known to work||12.0
 CC||jakub at gcc dot gnu.org

[Bug target/104253] libgcc missing __floatdiif

2022-04-07 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104253

--- Comment #20 from Eric Botcazou  ---
> Eric, we don't have access to test VxWorks.  Can you try changing the
> dg-require using ppc_float128_sw to ppc_float128_hw and see if that fixes it
> for you?

Apparently not, so Michael's approach is probably required.

[Bug ipa/103378] [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) since r12-5412-g458d2c689963d846

2022-04-07 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103378

--- Comment #6 from Jan Hubicka  ---
I am testing
diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc
index 01f4e28204e..bc3dc754481 100644
--- a/gcc/cgraphunit.cc
+++ b/gcc/cgraphunit.cc
@@ -621,6 +621,7 @@ cgraph_node::analyze (void)
   tree decl = this->decl;
   location_t saved_loc = input_location;
   input_location = DECL_SOURCE_LOCATION (decl);
+  semantic_interposition = opt_for_fn (decl, flag_semantic_interposition);

   if (thunk)
 {

[Bug ipa/104303] [12 regression] gnatmake is miscompiled by IPA/modref

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104303

--- Comment #7 from Richard Biener  ---
(In reply to Jan Hubicka from comment #6)
> OK, tree-ssa-alias is using:
> 
> if (ref_may_access_global_memory_p (ref))
> 
> to determine if the access to S9b.6_22 may be used by the call.  I expected
> this to return true because memory pointed to S9b.6_22 is escaping and thus
> it is accessible from global memory accesses.

Where does it exactly do this in breaking the testcase?  It seems this
function is "new" (I don't remember adding it), and it doesn't use
ref_may_alias_global_p for some reason ...

[...]

> So this predicate tests something different - it tests if the deref can
> alias global variable, not global memory in a sense of anything accessible
> from outside world.
>
> So I want to also return true on points to set that contains escaped?
> 
> diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc
> index 50bd47b31f3..9e34f76c3cb 100644
> --- a/gcc/tree-ssa-alias.cc
> +++ b/gcc/tree-ssa-alias.cc
> @@ -2578,8 +2578,24 @@ ref_may_access_global_memory_p (ao_ref *ref)
>if (TREE_CODE (base) == MEM_REF
>|| TREE_CODE (base) == TARGET_MEM_REF)
>  {
> -  if (ptr_deref_may_alias_global_p (TREE_OPERAND (base, 0)))
> +  struct ptr_info_def *pi;
> +  tree ptr = TREE_OPERAND (base, 0);
> +
> +  /* If we end up with a pointer constant here that may point
> +to global memory.  */
> +  if (TREE_CODE (ptr) != SSA_NAME)
> +   return true;
> +
> +  pi = SSA_NAME_PTR_INFO (ptr);
> +
> +  /* If we do not have points-to information for this variable,
> +we have to punt.  */
> +  if (!pi)
> return true;
> +
> +  /* ???  This does not use TBAA to prune globals ptr may not access. 
> */
> +  return pt_solution_includes_global (&pi->pt)
> +|| pi->pt.vars_contains_escaped;
>  }
>else
>  {

At least it should be consistent with this predicate, so doing sth
special only here doesn't make much sense.

I don't remember why I excluded pt->vars_contains_escaped from
pt_solution_includes_global, the testcase I added also passes with
it checked.

OTOH ref_may_alias_global_p_1 does

static bool
ref_may_alias_global_p_1 (tree base)
{ 
  if (DECL_P (base))
return is_global_var (base);

so a local escaped variable would not be considered aliasing a global
variable from this.

Maybe for clarity we should add flags (defaulted to true?) to those
predicates indicating whether escaped automatic variables should be
considered "global"?  Or add an explicit ptr_deref_may_alias_escaped ().

For example points_to_local_or_readonly_memory_p () seems to exclude
escaped locals, likewise DSE.

But it seems ref_may_access_global_memory_p would be replaced with
ref_may_alias_global_p (ref, true)?

[Bug ipa/104303] [12 regression] gnatmake is miscompiled by IPA/modref

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104303

--- Comment #8 from Richard Biener  ---
Btw, ref_may_access_global_memory_p already checks

  if (!auto_var_in_fn_p (base, current_function_decl)
  || pt_solution_includes (&cfun->gimple_df->escaped,
   base))

so it seems it was aware of some issue.  I'm testing some patch.

[Bug c++/105191] [12 Regression] '' "is not a constant expression" regression in GCC 12

2022-04-07 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105191

Patrick Palka  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 CC||jason at gcc dot gnu.org,
   ||ppalka at gcc dot gnu.org
  Known to work||10.3.0, 11.2.0
  Known to fail||12.0
Summary|'' "is not a|[12 Regression]
   |constant expression"|'' "is not a
   |regression in GCC 12|constant expression"
   ||regression in GCC 12
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=92385
   Last reconfirmed||2022-04-07
   Target Milestone|--- |12.0
 Status|UNCONFIRMED |NEW

--- Comment #1 from Patrick Palka  ---
Confirmed, started with r12-6326-ge948436eab818c

[Bug c++/103328] [11 Regression] ICE in remap_gimple_stmt with coroutines since r11-7419-g0f161cc8494cf728

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103328

--- Comment #25 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Richard Biener
:

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

commit r11-9789-ga77c9efdeb9ecad14ecca73db0e45fcd9d884382
Author: Benno Evers 
Date:   Sat Apr 2 17:22:33 2022 +0100

c++: Fix ICE due to shared BLOCK node in coroutine generation [PR103328]

When finishing a function that is a coroutine, the function is
transformed into a "ramp" function, and the original user-provided
function body gets moved into a newly created "actor" function.

In this case `current_function_decl` points to the ramp function,
but `current_binding_level->blocks` would still point to the
scope block of the user-provided function body in the actor function,
so when the ramp function was finished during `poplevel()` in decl.cc,
we could end up with that block being reused as the `DECL_INITIAL()` of
the ramp function:

   subblocks = functionbody >= 0 ? current_binding_level->blocks : 0;
   // [...]
   DECL_INITIAL (current_function_decl) = block ? block : subblocks;

This block would then be independently modified by subsequent passes
touching either the ramp or the actor function, potentially causing
an ICE depending on the order and function of these passes.

gcc/cp/ChangeLog:

PR c++/103328
* coroutines.cc (morph_fn_to_coro): Reset
current_binding_level->blocks.

gcc/testsuite/ChangeLog:

PR c++/103328
* g++.dg/coroutines/pr103328.C: New test.

Co-Authored-By: Iain Sandoe 
(cherry picked from commit 0847ad33b908af88bca1e6980d0b977316d05e18)

[Bug ipa/103432] [11 regression] libjxl-0.5 is miscompiled, works fine with -fno-ipa-modref

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103432

--- Comment #7 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Richard Biener
:

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

commit r11-9791-gf0c601ed0080ab9ebe2bc0c23d41471531e2af02
Author: Jan Hubicka 
Date:   Fri Nov 26 13:36:35 2021 +0100

Fix handling of in_flags in update_escape_summary_1

update_escape_summary_1 has thinko where it compues proper min_flags but
then
stores original value (ignoring the fact whether there was a dereference
in the escape point).

PR ipa/103432
* ipa-modref.c (update_escape_summary_1): Fix handling of
min_flags.

(cherry picked from commit a70faf6e4df7481c2c9a08a06657c20beb3043de)

[Bug ipa/103432] [11 regression] libjxl-0.5 is miscompiled, works fine with -fno-ipa-modref

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103432

Richard Biener  changed:

   What|Removed |Added

  Known to fail|11.2.1  |11.2.0
  Known to work||11.2.1
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Richard Biener  ---
Should be fixed now.

[Bug c++/103328] [11 Regression] ICE in remap_gimple_stmt with coroutines since r11-7419-g0f161cc8494cf728

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103328

Richard Biener  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
  Known to fail|11.2.1  |11.2.0
  Known to work||11.2.1

--- Comment #26 from Richard Biener  ---
Done and fixed.

[Bug c++/105191] [12 Regression] '' "is not a constant expression" regression in GCC 12

2022-04-07 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105191

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Priority|P3  |P1

[Bug ipa/104303] [12 regression] gnatmake is miscompiled by IPA/modref

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104303

--- Comment #9 from Richard Biener  ---
Created attachment 52768
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52768&action=edit
patch in testing

I'm testing this, adding escaped_local_p parameters throughout the API and
adjusting consumers, throwing away ref_may_access_global_memory_p.

Following passes adjusted from false to true:

- DCE in mark_stmt_if_obviously_necessary but that's just compile-time
  optimization I think
- trans-mem.cc I think got it wrong, so now fixed (but trans-mem is dead)
- the modref query in modref_may_conflict

all others keep passing false.

[Bug c++/102208] Acceptance of invalid decltype(auto) in the default operator <=>

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102208

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

https://gcc.gnu.org/g:88b939b19ab454ab2d932ef292bbc557abe4431c

commit r12-8047-g88b939b19ab454ab2d932ef292bbc557abe4431c
Author: David Malcolm 
Date:   Thu Apr 7 08:33:26 2022 -0400

analyzer: fix leak false +ve with symbolic writes [PR102208]

PR analyzer/102208 reports false positives from -Wanalyzer-malloc-leak.
The root cause is the analyzer getting confused about symbolic writes
that could alias a pointer referencing a malloced buffer.

struct st
{
  void *ptr;
  int arr[10];
};

struct st test (int idx)
{
  struct st s;
  s.ptr = __builtin_malloc (1024);  /* (1) */
  s.arr[idx] = 42;  /* (2) */
  return s;
}

When removing overlapping bindings at (2),
store::remove_overlapping_bindings was failing to pass on the
uncertainty_t *, and thus when clobbering the binding of s.ptr, the
heap-allocated pointer was not being added to the set of maybe-bound
svalues, and thus being treated as leaking.

This patch fixes this, so that s.ptr from (1) is treated as maybe-bound
after the write at (2), fixing the leak false postive.

Doing so requires the store to be smarter about how clobbering happens
with various combinations of concrete keys and symbolic keys within
concrete clusters and symbolic clusters, so that we don't lose warnings
about definite leaks.

gcc/analyzer/ChangeLog:
PR analyzer/102208
* store.cc (binding_map::remove_overlapping_bindings): Add
"always_overlap" param, using it to generalize to the case where
we want to remove all bindings.  Update "uncertainty" logic to
only record maybe-bound values for cases where there is a symbolic
write involved.
(binding_cluster::mark_region_as_unknown): Split param "reg" into
"reg_to_bind" and "reg_for_overlap".
(binding_cluster::maybe_get_compound_binding): Pass "false" to
binding_map::remove_overlapping_bindings new "always_overlap"
param.
(binding_cluster::remove_overlapping_bindings): Determine
"always_overlap" and pass it to
binding_map::remove_overlapping_bindings.
(store::set_value): Pass uncertainty to remove_overlapping_bindings
call.  Update for new param of
binding_cluster::mark_region_as_unknown, passing both the base
region of the iter_cluster, and the lhs_reg.
(store::mark_region_as_unknown): Update for new param of
binding_cluster::mark_region_as_unknown, passing "reg" for both.
(store::remove_overlapping_bindings): Add param "uncertainty", and
pass it on to call to
binding_cluster::remove_overlapping_bindings.
* store.h (binding_map::remove_overlapping_bindings): Add
"always_overlap" param.
(binding_cluster::mark_region_as_unknown): Split param "reg" into
"reg_to_bind" and "reg_for_overlap".
(store::remove_overlapping_bindings): Add param "uncertainty".

gcc/testsuite/ChangeLog:
PR analyzer/102208
* gcc.dg/analyzer/symbolic-9.c: New test.
* gcc.dg/analyzer/torture/leak-pr102308-1.c: New test.
* gcc.dg/analyzer/torture/leak-pr102308-2.c: New test.

Signed-off-by: David Malcolm 

[Bug c++/102208] Acceptance of invalid decltype(auto) in the default operator <=>

2022-04-07 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102208

David Malcolm  changed:

   What|Removed |Added

 CC||dmalcolm at gcc dot gnu.org

--- Comment #2 from David Malcolm  ---
(In reply to CVS Commits from comment #1)
> The master branch has been updated by David Malcolm :
> 
> https://gcc.gnu.org/g:88b939b19ab454ab2d932ef292bbc557abe4431c
> 
> commit r12-8047-g88b939b19ab454ab2d932ef292bbc557abe4431c
> Author: David Malcolm 
> Date:   Thu Apr 7 08:33:26 2022 -0400
> 
> analyzer: fix leak false +ve with symbolic writes [PR102208]
> 

Sorry, this should have been PR 102308

[Bug analyzer/102308] False positive -Wanalyzer-malloc-leak when writing to array in struct

2022-04-07 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102308

--- Comment #2 from David Malcolm  ---
I typoed this bug's ID 102308 as 102208 in the commit message; so the message
went to the wrong bug; here's a copy-and-paste of the commit notification that
went there:

The master branch has been updated by David Malcolm :

https://gcc.gnu.org/g:88b939b19ab454ab2d932ef292bbc557abe4431c

commit r12-8047-g88b939b19ab454ab2d932ef292bbc557abe4431c
Author: David Malcolm 
Date:   Thu Apr 7 08:33:26 2022 -0400

analyzer: fix leak false +ve with symbolic writes [PR102208]

PR analyzer/102208 reports false positives from -Wanalyzer-malloc-leak.
The root cause is the analyzer getting confused about symbolic writes
that could alias a pointer referencing a malloced buffer.

struct st
{
  void *ptr;
  int arr[10];
};

struct st test (int idx)
{
  struct st s;
  s.ptr = __builtin_malloc (1024);  /* (1) */
  s.arr[idx] = 42;  /* (2) */
  return s;
}

When removing overlapping bindings at (2),
store::remove_overlapping_bindings was failing to pass on the
uncertainty_t *, and thus when clobbering the binding of s.ptr, the
heap-allocated pointer was not being added to the set of maybe-bound
svalues, and thus being treated as leaking.

This patch fixes this, so that s.ptr from (1) is treated as maybe-bound
after the write at (2), fixing the leak false postive.

Doing so requires the store to be smarter about how clobbering happens
with various combinations of concrete keys and symbolic keys within
concrete clusters and symbolic clusters, so that we don't lose warnings
about definite leaks.

gcc/analyzer/ChangeLog:
PR analyzer/102208
* store.cc (binding_map::remove_overlapping_bindings): Add
"always_overlap" param, using it to generalize to the case where
we want to remove all bindings.  Update "uncertainty" logic to
only record maybe-bound values for cases where there is a symbolic
write involved.
(binding_cluster::mark_region_as_unknown): Split param "reg" into
"reg_to_bind" and "reg_for_overlap".
(binding_cluster::maybe_get_compound_binding): Pass "false" to
binding_map::remove_overlapping_bindings new "always_overlap"
param.
(binding_cluster::remove_overlapping_bindings): Determine
"always_overlap" and pass it to
binding_map::remove_overlapping_bindings.
(store::set_value): Pass uncertainty to remove_overlapping_bindings
call.  Update for new param of
binding_cluster::mark_region_as_unknown, passing both the base
region of the iter_cluster, and the lhs_reg.
(store::mark_region_as_unknown): Update for new param of
binding_cluster::mark_region_as_unknown, passing "reg" for both.
(store::remove_overlapping_bindings): Add param "uncertainty", and
pass it on to call to
binding_cluster::remove_overlapping_bindings.
* store.h (binding_map::remove_overlapping_bindings): Add
"always_overlap" param.
(binding_cluster::mark_region_as_unknown): Split param "reg" into
"reg_to_bind" and "reg_for_overlap".
(store::remove_overlapping_bindings): Add param "uncertainty".

gcc/testsuite/ChangeLog:
PR analyzer/102208
* gcc.dg/analyzer/symbolic-9.c: New test.
* gcc.dg/analyzer/torture/leak-pr102308-1.c: New test.
* gcc.dg/analyzer/torture/leak-pr102308-2.c: New test.

Signed-off-by: David Malcolm 

[Bug debug/105194] -ftree-dce leads to intermittent visibility of variable due to partial DWARF location ranges

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105194

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #1 from Richard Biener  ---
Confirmed.  With the fix for PR105158 the information is preserved so I think
we can consider this a duplicate.

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

[Bug debug/105158] ftree-ccp (CFG cleanup) drops DWARF const value attribute at -Og/-O1/-O2/-O3

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105158

--- Comment #4 from Richard Biener  ---
*** Bug 105194 has been marked as a duplicate of this bug. ***

[Bug analyzer/102308] False positive -Wanalyzer-malloc-leak when writing to array in struct

2022-04-07 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102308

David Malcolm  changed:

   What|Removed |Added

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

--- Comment #3 from David Malcolm  ---
Should be fixed by the above commit for GCC 12.

[Bug ipa/104303] [12 regression] gnatmake is miscompiled by IPA/modref

2022-04-07 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104303

--- Comment #10 from hubicka at kam dot mff.cuni.cz ---
Hi,
> 
> I'm testing this, adding escaped_local_p parameters throughout the API and
> adjusting consumers, throwing away ref_may_access_global_memory_p.
> 
> Following passes adjusted from false to true:
> 
> - DCE in mark_stmt_if_obviously_necessary but that's just compile-time
>   optimization I think
> - trans-mem.cc I think got it wrong, so now fixed (but trans-mem is dead)
> - the modref query in modref_may_conflict
> 
> all others keep passing false.

Thanks!  I was adding the function when introducing global memory logic
to modref. This was targeted to handle fatigue regression at -O2 but it
also helps in quite few extra cases.

Honza

[Bug plugins/105171] gcc/toplev.c: `local_tick` can overflow and become -1

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105171

--- Comment #20 from Richard Biener  ---
(In reply to Andrew Pinski from comment #19)
> It is a small optimization to remove the file is the timestamp is valid
> while compiling.

uh, what coverage.cc is doing is "odd" at best.  local_tick shouldn't have been
exported in the first place.

[Bug ipa/104303] [12 regression] gnatmake is miscompiled by IPA/modref

2022-04-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104303

--- Comment #11 from CVS Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:8c0ebaf9f586100920a3c0849fb10e9985d7ae58

commit r12-8048-g8c0ebaf9f586100920a3c0849fb10e9985d7ae58
Author: Richard Biener 
Date:   Thu Apr 7 14:07:54 2022 +0200

ipa/104303 - miscompilation of gnatmake

Modref attempts to track memory accesses relative to the base pointers
which are parameters of functions.
If it fails, it still makes difference between unknown memory access and
global memory access.  The second makes it possible to disambiguate with
memory that is not accessible from outside world (i.e. everything that does
not escape from the caller function).  This is useful so we do not punt
when unknown function is called.

The added ref_may_access_global_memory_p ends up using
ptr_deref_may_alias_global_p which does not consider escaped automatic
variables as global.  For modref those are still global since they
can be accessed from functions called.

The following adds a flag to the *_global_p APIs indicating whether
escaped local memory should be considered as global or not and
removes ref_may_access_global_memory_p in favor of using
ref_may_alias_global_p with the flag set to true.

2022-04-07  Richard Biener  
Jan Hubicka  

PR ipa/104303
* tree-ssa-alias.h (ptr_deref_may_alias_global_p,
ref_may_alias_global_p, ref_may_alias_global_p,
stmt_may_clobber_global_p, pt_solution_includes_global): Add
bool parameters indicating whether escaped locals should be
considered global.
* tree-ssa-structalias.cc (pt_solution_includes_global):
When the new escaped_nonlocal_p flag is true also consider
pt->vars_contains_escaped.
* tree-ssa-alias.cc (ptr_deref_may_alias_global_p):
Pass down new escaped_nonlocal_p flag.
(ref_may_alias_global_p): Likewise.
(stmt_may_clobber_global_p): Likewise.
(ref_may_alias_global_p_1): Likewise.  For decls also
query the escaped solution if true.
(ref_may_access_global_memory_p): Remove.
(modref_may_conflict): Use ref_may_alias_global_p with
escaped locals considered global.
(ref_maybe_used_by_stmt_p): Adjust.
* ipa-fnsummary.cc (points_to_local_or_readonly_memory_p):
Likewise.
* tree-ssa-dse.cc (dse_classify_store): Likewise.
* trans-mem.cc (thread_private_new_memory): Likewise, but
consider escaped locals global.
* tree-ssa-dce.cc (mark_stmt_if_obviously_necessary): Likewise.

* gnat.dg/concat5.adb: New.
* gnat.dg/concat5_pkg1.adb: Likewise.
* gnat.dg/concat5_pkg1.ads: Likewise.
* gnat.dg/concat5_pkg2.adb: Likewise.
* gnat.dg/concat5_pkg2.ads: Likewise.

[Bug ipa/104303] [12 regression] gnatmake is miscompiled by IPA/modref

2022-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104303

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #12 from Richard Biener  ---
Should be fixed now.

[Bug c++/105186] [9/10/11/12 Regression] ICE in canonicalize_attr_name, at attribs.h:146

2022-04-07 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105186

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P2
Summary|ICE in  |[9/10/11/12 Regression] ICE
   |canonicalize_attr_name, at  |in canonicalize_attr_name,
   |attribs.h:146   |at attribs.h:146
 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |9.5

--- Comment #2 from Jakub Jelinek  ---
Started with r5-4106-g78a7c3172fe2e6cd959abb8bfc69f6b0dc747d49

[Bug c++/105195] New: spurious warning label defined but not used with if constexpr

2022-04-07 Thread barry.revzin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105195

Bug ID: 105195
   Summary: spurious warning label defined but not used with if
constexpr
   Product: gcc
   Version: 11.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: barry.revzin at gmail dot com
  Target Milestone: ---

Similar to other "if constexpr" related warnings, gcc warns on this example:

void g();
void h();

template 
void f() {
if constexpr (B) {
goto label;
}

g();

label:
h();
}

int main() {
f();
}

:12:1: warning: label 'label' defined but not used [-Wunused-label]
   12 | label:
  | ^

But the label is used, just not in this particular instantiation.

[Bug c++/59716] [10/11 Regression] variadic template multiple parameter pack expansion fails

2022-04-07 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59716

--- Comment #9 from Patrick Palka  ---
Hmm, this PR is essentially a dup of PR88580 but I don't think it's a 10/11
regression: between r8-2715 and r10-3735 it seems we just went from incorrectly
rejecting the testcase (the behavior before r8-2715) to miscompiling it.  After
r10-3735 we went back to incorrectly rejecting it (arguably an improvement). 
So AFAICT we never correctly handled this testcase before r12-174.


Output when compiled with GCC trunk:

  Construction of: DebugPrinter::DebugPrinter(Y ...) [with Y = {int,
char, void*, int}; Head = int; T = {char, int, float}] Values: 1, c, 0xd,
1, 
  Construction of: DebugPrinter::DebugPrinter(Y ...) [with Y = {float,
char, void*, float}; Head = float; T = {void*, int, float}] Values: 2.2, c,
0xd, 2.2, 

GCC 10/11 reject the testcase.

Output when compiled with GCC 7.4/8/9 (miscompile):

  Construction of: DebugPrinter::DebugPrinter(Y ...) [with Y = {int,
bool, int}; Head = int; T = {char, int, float}] Values: 1, 0, 1, 
  Construction of: DebugPrinter::DebugPrinter(Y ...) [with Y = {float,
bool, float}; Head = float; T = {void*, int, float}] Values: 2.2, 0, 2.2, 

GCC < 7.4 reject the testcase.

Output when compiled with Clang (equivalent to GCC trunk output):

  Construction of: DebugPrinter::DebugPrinter(Y...)
[Head = int, T = , Y = ] Values: 1,
c, 0xd, 1, 
  Construction of: DebugPrinter::DebugPrinter(Y...)
[Head = float, T = , Y = ]
Values: 2.2, c, 0xd, 2.2,

[Bug c++/105195] spurious warning label defined but not used with if constexpr

2022-04-07 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105195

Marek Polacek  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Keywords||diagnostic
 CC||mpolacek at gcc dot gnu.org
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2022-04-07

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

[Bug testsuite/101528] [11 regression] gcc.target/powerpc/int_128bit-runnable.c fails after r11-8743

2022-04-07 Thread seurer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101528

--- Comment #3 from seurer at gcc dot gnu.org ---
Yes, there were still failures in the latest test runs.

[Bug ipa/104303] [12 regression] gnatmake is miscompiled by IPA/modref

2022-04-07 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104303

--- Comment #13 from Eric Botcazou  ---
> Should be fixed now.

Yes, I confirm that gnatmake now works correctly again, thanks!

[Bug c++/103328] [11 Regression] ICE in remap_gimple_stmt with coroutines since r11-7419-g0f161cc8494cf728

2022-04-07 Thread avi at scylladb dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103328

--- Comment #27 from Avi Kivity  ---
Wonderful, thank you.

[Bug ipa/105160] [12 regression] ipa modref marks functions with asm volatile as const or pure

2022-04-07 Thread jeremy.linton at arm dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105160

jeremy.linton at arm dot com changed:

   What|Removed |Added

 CC||jeremy.linton at arm dot com

--- Comment #8 from jeremy.linton at arm dot com ---
(In reply to Jan Hubicka from comment #5)
> It is indeed missing logic to merge the side_effect and nondeterministic
> flag while updating after inlining.  I am testing the following
> 

I built a fedora gcc12 package with this patch, and then built a 4.17 kernel.
Looking at the genet, it appears to be calling the enable_dma() routine now
from the _open() function. It also boots on the seattle, which was also
experiencing a gcc11/gcc12 related boot failure.  

So, at first glance it appears those two failures are corrected when this patch
is applied.

[Bug ipa/105160] [12 regression] ipa modref marks functions with asm volatile as const or pure

2022-04-07 Thread jeremy.linton at arm dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105160

--- Comment #9 from jeremy.linton at arm dot com ---
> I built a fedora gcc12 package with this patch, and then built a 4.17

I mistyped that (again), it should be 5.17.

  1   2   >