[Bug bootstrap/107120] [13 Regression] trunk fails to bootstrap on powerpc64le-linux-gnu

2022-10-09 Thread asolokha at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107120

--- Comment #3 from Arseny Solokha  ---
(In reply to Arseny Solokha from comment #2)
> I get the same bootstrap error in libitm while building gcc 13.0.0 20221002
> snapshot (g:d01bd0b0f3b8f4c33c437ff10f0b949200627f56) against glibc 2.36 for
> x86_64.

Jakub in PR107128 comment 4 said enough to resolve this issue for me.

[Bug tree-optimization/107090] [aarch64] sequence logic should be combined with mul and umulh

2022-10-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107090

Andrew Pinski  changed:

   What|Removed |Added

 Depends on||103216

--- Comment #6 from Andrew Pinski  ---
(In reply to vfdff from comment #5)
> Created attachment 53684 [details]
> Add A ? B + CST : B match and simplify optimizations
> 
> Fix the 1st issue of the pattern match

There is a generic way of implementing this which I had posted at
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/584411.html (you can
finish up that patch if you want).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103216
[Bug 103216] missed optimization, phiopt/vrp?

[Bug tree-optimization/107090] [aarch64] sequence logic should be combined with mul and umulh

2022-10-09 Thread zhongyunde at huawei dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107090

vfdff  changed:

   What|Removed |Added

 CC||zhongyunde at huawei dot com

--- Comment #5 from vfdff  ---
Created attachment 53684
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53684=edit
Add A ? B + CST : B match and simplify optimizations

Fix the 1st issue of the pattern match

[Bug libstdc++/106665] Cannot pass barrier by reference

2022-10-09 Thread shihyente at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106665

--- Comment #5 from SHIH YEN-TE  ---
Thanks, call pool.clear(); works.

[Bug libstdc++/106665] Cannot pass barrier by reference

2022-10-09 Thread shihyente at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106665

--- Comment #4 from SHIH YEN-TE  ---
You are right, I didn't notice it as well. Thanks for pointing it out.

[Bug target/107160] [13 regression] r13-2641-g0ee1548d96884d causes verification failure in spec2006

2022-10-09 Thread linkw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107160

Kewen Lin  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |linkw at gcc dot gnu.org

--- Comment #4 from Kewen Lin  ---
Just back from holiday, thanks for reporting! I'll take a look.


(In reply to seurer from comment #3)
> Note that 554.roms_r from spec2017 also fails after this commit.

I suspected what you saw on SPEC2017 554.roms_r is related to PR103320. The
culprit commit can make some loops unrolled (they are not previously), PR103320
showed that loops unrolling matters. So if you did add option
"-fno-unsafe-math-optimizations" for the run with "-funroll-loops", then you
need it since this commit too. Could you double check?

[Bug target/107093] AVX512 mask operations not simplified in fully masked loop

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

--- Comment #2 from Hongtao.liu  ---
For UNSPEC part, we can create a new define_insn with genenral operation and
accept both gpr and mask alternatives just like other logic patterns.
For gpr version, we can split it to xor + not after reload.
For mask version, we can split it to kxnor with UNSPEC after reload.

It should help general simplication for xor and not.

[Bug target/107172] [13 Regression] wrong code with "-O1 -ftree-vrp" on x86_64-linux-gnu since r13-1268-g8c99e307b20c502e

2022-10-09 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107172

--- Comment #6 from Roger Sayle  ---
This sounds related to the discussion/patch originally proposed at
https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598040.html
and then revised (based on reviewer comments) at
https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598835.html

[Bug c/107197] valgrind error in function same_line_p during build

2022-10-09 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107197

--- Comment #3 from David Binderman  ---
81 revisions to bisect. Trying e2a228438919d846.

[Bug c/107197] valgrind error in function same_line_p during build

2022-10-09 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107197

--- Comment #2 from David Binderman  ---
Build with -O2 demonstrates the same valgrind problem, so someone this week,
between the two git hashes mentioned, has broken the -O2 build.

I haven't got the compute power here to do the bisect. Advice sought.

[Bug ipa/107196] [13 Regression] llvm-14.0.6 is miscompiles by gcc-13 in -O3: hangs llvm testsuite (inliner seems to break it)

2022-10-09 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107196

--- Comment #6 from Sergei Trofimovich  ---
(In reply to Andrew Pinski from comment #4)
> llvm/lib/Target/RISCV/RISCVISelLowering.cpp is huge source and it might have
> undefined code in it.
> Maybe narrow down which function is going wrong.

What would be the best way to do it? I initially tried '#pragma GCC
push_options/#pragma GCC optimize(0)/#pragma GCC pop_options', but the final
result still requires a few headers and RISCVISelLowering.cpp functions to be
outside optimize(0).

I'm afraid I spent on in a few days and filed the bug in hopes there is a nicer
technique to nail down the specific transformation that changes the behaviour.

If there is no better way to do it I'll start sprinkling
__attribute__((noinline, noipa)) around to get broken and working variants
closer.

> Maybe fire up gdb and see where the infinite loop is located too.

Looking at gdb the problem is not very clear: generic (not RISCV-specific code)
at '#8  Run () at llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1538'
implements some instruction selection logic to pick better instructions
(DAGCombiner). Normally it stabilizes, but in this case it does not finish.
Heavy use of STL-like data structures do not make it easier to trace through in
gdb to see where first deviation bet ween good/bad happens. llvm has debugging
mode to dump the transformations applied but enabling it at build time make the
bug to go away.

Full backtrace:

llvm::DenseMapBase,
llvm::detail::DenseMapPair >, llvm::SDNode*,
unsigned int, llvm::DenseMapInfo,
llvm::detail::DenseMapPair
>::LookupBucketFor () at llvm/include/llvm/ADT/DenseMap.h:632
632   if (LLVM_LIKELY(KeyInfoT::isEqual(Val, ThisBucket->getFirst(
{
(gdb) bt
#0  llvm::DenseMapBase,
llvm::detail::DenseMapPair >, llvm::SDNode*,
unsigned int, llvm::DenseMapInfo,
llvm::detail::DenseMapPair
>::LookupBucketFor ()
at llvm/include/llvm/ADT/DenseMap.h:632
#1  llvm::DenseMapBase,
llvm::detail::DenseMapPair >, llvm::SDNode*,
unsigned int, llvm::DenseMapInfo,
llvm::detail::DenseMapPair
>::LookupBucketFor ()
at llvm/include/llvm/ADT/DenseMap.h:663
#2  llvm::DenseMapBase,
llvm::detail::DenseMapPair >, llvm::SDNode*,
unsigned int, llvm::DenseMapInfo,
llvm::detail::DenseMapPair >::try_emplace ()
at llvm/include/llvm/ADT/DenseMap.h:225
#3  llvm::DenseMapBase,
llvm::detail::DenseMapPair >, llvm::SDNode*,
unsigned int, llvm::DenseMapInfo,
llvm::detail::DenseMapPair >::insert ()
at llvm/include/llvm/ADT/DenseMap.h:216
#4  AddToWorklist () at llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:273
#5  0x014f12e8 in AddToWorklist () at
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:268
#6  AddUsersToWorklist () at llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:195
#7  AddToWorklistWithUsers () at
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:200
#8  Run () at llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1538
#9  llvm::SelectionDAG::Combine () at
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:24210
#10 0x015ea7bf in llvm::SelectionDAGISel::CodeGenAndEmitDAG ()
at llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:958
#11 0x015ed2c5 in llvm::SelectionDAGISel::SelectAllBasicBlocks ()
at llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1634
#12 0x015efd8b in llvm::SelectionDAGISel::runOnMachineFunction ()
at llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:515
#13 0x00ba4f34 in llvm::MachineFunctionPass::runOnFunction () at
llvm/lib/CodeGen/MachineFunctionPass.cpp:72
#14 llvm::MachineFunctionPass::runOnFunction () at
llvm/lib/CodeGen/MachineFunctionPass.cpp:37
#15 0x00ff87b0 in llvm::FPPassManager::runOnFunction () at
llvm/lib/IR/LegacyPassManager.cpp:1434
#16 0x00ff8b3c in llvm::FPPassManager::runOnModule () at
llvm/lib/IR/LegacyPassManager.cpp:1480
#17 0x00ffa39e in runOnModule () at
llvm/lib/IR/LegacyPassManager.cpp:1549
#18 llvm::legacy::PassManagerImpl::run () at
llvm/lib/IR/LegacyPassManager.cpp:539
#19 0x0065a38a in compileModule () at llvm/tools/llc/llc.cpp:719
#20 main () at llvm/tools/llc/llc.cpp:417

[Bug c/107197] valgrind error in function same_line_p during build

2022-10-09 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107197

--- Comment #1 from David Binderman  ---
I can tell you that last weekend's valgrind build with -O2 went fine.
That was from git hash ca01d2526917ec6e.

This weekend's valgrind build, with -O3 enabled, is from git hash
6ffbf87ca66f4ed9cd79cff675fabe2109e46e85.

So either someone has broken something this week in -O2, or -O3 has been
broken for longer.

I will take the -O3 off this weekend's build, drop back to -O2 and see
what happens.

[Bug c/107197] New: valgrind error in function same_line_p during build

2022-10-09 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107197

Bug ID: 107197
   Summary: valgrind error in function same_line_p during build
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

I've just had a go at building gcc trunk with -O3 under valgrind and
I got the following error:

/home/dcb/gcc/working/./gcc/xgcc -B/home/dcb/gcc/working/./gcc/
-B/home/dcb/gcc/results.20221009.valgrind/x86_64-pc-linux-gnu/bin/
-B/home/dcb/gcc/results.20221009.valgrind/x86_64-pc-linux-gnu/lib/ -isystem
/home/dcb/gcc/results.20221009.valgrind/x86_64-pc-linux-gnu/include -isystem
/home/dcb/gcc/results.20221009.valgrind/x86_64-pc-linux-gnu/sys-include-g
-O3 -O2 -g -O3 -DIN_GCC-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
./include  -I. -I. -I../.././gcc -I../../../trunk.git/libgcc
-I../../../trunk.git/libgcc/. -I../../../trunk.git/libgcc/../gcc
-I../../../trunk.git/libgcc/../include
-I../../../trunk.git/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT  -g0 
-finhibit-size-directive -fno-inline -fno-exceptions
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize
-fbuilding-libgcc -fno-stack-protector-I. -I. -I../.././gcc
-I../../../trunk.git/libgcc -I../../../trunk.git/libgcc/.
-I../../../trunk.git/libgcc/../gcc -I../../../trunk.git/libgcc/../include
-I../../../trunk.git/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -o
crtendS.o -MT crtendS.o -MD -MP -MF crtendS.dep -fno-omit-frame-pointer
-fno-asynchronous-unwind-tables -fcf-protection -mshstk -fpic -c
../../../trunk.git/libgcc/crtstuff.c -DCRT_END -DCRTSTUFFS_O
==107792== Conditional jump or move depends on uninitialised value(s)
==107792==at 0xD5004B: same_line_p (tree-cfg.cc:1160)
==107792==by 0xD5004B: assign_discriminators (tree-cfg.cc:1224)
==107792==by 0xD5004B: build_gimple_cfg (tree-cfg.cc:251)
==107792==by 0xD5004B: execute_build_cfg (tree-cfg.cc:371)

$ egrep "^Config|^==" mk.out 
Configuring in x86_64-pc-linux-gnu/libgcc
==107792== Conditional jump or move depends on uninitialised value(s)

So the problem occurs when building libgcc. Configure command is

../trunk.git/configure --prefix=/home/dcb/gcc/$PREFIX \
--disable-bootstrap \
--disable-multilib \
--disable-werror \
--with-pkgversion=$HASH \
--enable-checking=valgrind \
--enable-languages=c,c++

and to get -O3 into it, I have

sed 's/-O2/-O3/' < Makefile > Makefile.tmp
diff Makefile Makefile.tmp
mv Makefile.tmp Makefile

for the top-level Makefile.

[Bug ipa/107196] [13 Regression] llvm-14.0.6 is miscompiles by gcc-13 in -O3: hangs llvm testsuite (inliner seems to break it)

2022-10-09 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107196

--- Comment #5 from Sergei Trofimovich  ---
(In reply to Andrew Pinski from comment #1)
> We definitely needs more information than this. It could very well be a bug
> in LLVM too.
> Have you tried compiling LLVM with -fsanitize=address ?

(In reply to Andrew Pinski from comment #2)
> How about -fwrapv ?

Tried the following:
- -fwrapv: no change, hangup still happens
- -fsanitize=address: hangup disappears, no reports on stderr
- -fwrapv -fsanitize=address: hangup disappears, no reports on stderr
- -fsanitize=undefined: hangup disappears, no reports on stderr

[Bug tree-optimization/107195] [13 Regression] wrong code with "-O1 -fno-tree-ccp" on x86_64-linux-gnu

2022-10-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107195

--- Comment #2 from Andrew Pinski  ---
It is more recent than the patch which exposed PR 107172 though.

[Bug tree-optimization/107195] [13 Regression] wrong code with "-O1 -fno-tree-ccp" on x86_64-linux-gnu

2022-10-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107195

Andrew Pinski  changed:

   What|Removed |Added

Summary|wrong code with "-O1|[13 Regression] wrong code
   |-fno-tree-ccp" on   |with "-O1 -fno-tree-ccp" on
   |x86_64-linux-gnu|x86_64-linux-gnu
  Known to work||12.2.0
   Target Milestone|--- |13.0
   Keywords||wrong-code

[Bug tree-optimization/107195] wrong code with "-O1 -fno-tree-ccp" on x86_64-linux-gnu

2022-10-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107195

--- Comment #1 from Andrew Pinski  ---
It worked with:
gcc version 13.0.0 20221008 (experimental)
(Compiler-Explorer-Build-gcc-705ed42a1ad950860f46c51216ff69dbe0f4857a-binutils-2.38)
 

So definitely a recent regression.

[Bug fortran/100971] ICE: Bad IO basetype (7)

2022-10-09 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100971

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2022-October/058305.html

[Bug debug/107193] [13 regression] bootstrap error caused by r13-3172-gf30e9fd33e56a5

2022-10-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107193

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |blocker

[Bug bootstrap/107193] [13 regression] bootstrap error caused by r13-3172-gf30e9fd33e56a5

2022-10-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107193

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |13.0

[Bug ipa/107196] [13 Regression] llvm-14.0.6 is miscompiles by gcc-13 in -O3: hangs llvm testsuite (inliner seems to break it)

2022-10-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107196

--- Comment #4 from Andrew Pinski  ---
llvm/lib/Target/RISCV/RISCVISelLowering.cpp is huge source and it might have
undefined code in it.
Maybe narrow down which function is going wrong.

Maybe fire up gdb and see where the infinite loop is located too.

[Bug ipa/107196] [13 Regression] llvm-14.0.6 is miscompiles by gcc-13 in -O3: hangs llvm testsuite (inliner seems to break it)

2022-10-09 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107196

--- Comment #3 from Sergei Trofimovich  ---
The clues:

1. I bisected gcc down to

  commit 2460f7cdef7ef9c971de79271afc0db73687a272
  Author: Aldy Hernandez 
  Date:   Fri Sep 23 19:47:33 2022 +0200

Set ranges from unreachable edges for all known ranges.

But I suspect it's not the culprit and only a trigger in inliner behaviour
change.

2. The bug is probably somewhere in mis-compilation of
llvm/lib/Target/RISCV/RISCVISelLowering.cpp. The following workaround repairs
the test:

--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -1,3 +1,4 @@
+#pragma GCC optimize(0)
 //===-- RISCVISelLowering.cpp - RISCV DAG Lowering Implementation 
===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.

$ timeout 10 bin/llc -mtriple=riscv32 -target-abi=ilp32d
-mattr=+v,+zfh,+experimental-zvfh,+f,+d -riscv-v-vector-bits-min=128
-riscv-v-fixed-length-vector-lmul-max=1 -verify-machineinstrs ./bug.ll && echo
FINISHED || echo TIMED OUT
'+experimental-zvfh' is not a recognized feature for this target (ignoring
feature)
'+experimental-zvfh' is not a recognized feature for this target (ignoring
feature)
'+experimental-zvfh' is not a recognized feature for this target (ignoring
feature)
FINISHED

3. It looks like using '-O2 --param=max-inline-insns-single=116' (instead of
-O3) against llvm/lib/Target/RISCV/RISCVISelLowering.cpp is enough to trigger
the bug. '-O2 --param=max-inline-insns-single=115' sees to work.

[Bug ipa/107196] [13 Regression] llvm-14.0.6 is miscompiles by gcc-13 in -O3: hangs llvm testsuite (inliner seems to break it)

2022-10-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107196

--- Comment #2 from Andrew Pinski  ---
How about -fwrapv ?

[Bug ipa/107196] [13 Regression] llvm-14.0.6 is miscompiles by gcc-13 in -O3: hangs llvm testsuite (inliner seems to break it)

2022-10-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107196

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2022-10-09
 Status|UNCONFIRMED |WAITING

--- Comment #1 from Andrew Pinski  ---
We definitely needs more information than this. It could very well be a bug in
LLVM too.
Have you tried compiling LLVM with -fsanitize=address ?

[Bug ipa/107196] New: [13 Regression] llvm-14.0.6 is miscompiles by gcc-13 in -O3: hangs llvm testsuite (inliner seems to break it)

2022-10-09 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107196

Bug ID: 107196
   Summary: [13 Regression] llvm-14.0.6 is miscompiles by gcc-13
in -O3: hangs llvm testsuite (inliner seems to break
it)
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: slyfox at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

It's not a self-contained bug and requires full llvm build to trigger it. My
apologies. In my defense I have a few small clues to share!

The heavyweight reproducer: download llvm, build it with this week's gcc and
run one test that hangs. The bug started happening about 2 weeks ago.

The reproducer steps:

$ export CC=gcc-13
$ export CXX=g++-13

$ wget -c
https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/llvm-project-14.0.6.src.tar.xz
$ tar xf llvm-project-14.0.6.src.tar.xz
$ mkdir build
$ cd build

# We will build only 'llc' and run only one minimal haning test.

$ cmake ../llvm-project-14.0.6.src/llvm -DCMAKE_BUILD_TYPE=Release
-DLLVM_TARGETS_TO_BUILD=RISCV -DLLVM_ENABLE_PROJECTS='llvm'
$ make -j $(nproc) llc

$ cat >bug.ll <* %x, <8 x half>* %y) {
; LMULMAX1-LABEL: ui2fp_v8i64_v8f16:
; LMULMAX1:   # %bb.0:
  %a = load <8 x i64>, <8 x i64>* %x
  %d = uitofp <8 x i64> %a to <8 x half>
  store <8 x half> %d, <8 x half>* %y
  ret void
}
EOF

$ timeout 10 bin/llc -mtriple=riscv32 -target-abi=ilp32d
-mattr=+v,+zfh,+experimental-zvfh,+f,+d -riscv-v-vector-bits-min=128
-riscv-v-fixed-length-vector-lmul-max=1 -verify-machineinstrs ./bug.ll && echo
FINISHED || echo TIMED OUT

'+experimental-zvfh' is not a recognized feature for this target (ignoring
feature)
'+experimental-zvfh' is not a recognized feature for this target (ignoring
feature)
'+experimental-zvfh' is not a recognized feature for this target (ignoring
feature)
TIMED OUT

$ LANG=C $CC -v |& unnix
Using built-in specs.
COLLECT_GCC=/<>/gcc-13.0.0/bin/gcc
COLLECT_LTO_WRAPPER=/<>/gcc-13.0.0/libexec/gcc/x86_64-unknown-linux-gnu/13.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with:
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.0.0 20221002 (experimental) (GCC)

[Bug fortran/102275] Assumed rank, unlimited polymorphic pointer gives incorrect behaviour

2022-10-09 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102275

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

  Known to fail||10.4.0, 11.2.0, 11.3.0
   Keywords||wrong-code
  Known to work||12.2.1, 13.0

--- Comment #2 from anlauf at gcc dot gnu.org ---
Adding versions known to work and known to fail.

[Bug libstdc++/106665] Cannot pass barrier by reference

2022-10-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106665

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #3 from Jonathan Wakely  ---
I didn't see this when it got reported. It is definitely a race condition.
UBsan is telling you about a real bug in the program.

[Bug libfortran/105764] libgfortran fails to build with a custom thread model

2022-10-09 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105764

Eric Gallager  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED
 CC||aldot at gcc dot gnu.org,
   ||egallager at gcc dot gnu.org
   Last reconfirmed||2022-10-09
   Assignee|unassigned at gcc dot gnu.org  |lh_mouse at 126 dot com

--- Comment #1 from Eric Gallager  ---
Taking conversation on the gcc-patches mailing list as confirmation:
https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602821.html

[Bug c++/107191] [modules] ICE when importing module partition (internal compiler error: in tree_node, at cp/module.cc:9061)

2022-10-09 Thread tortoise_74 at yahoo dot co.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107191

--- Comment #2 from Bruce Adams  ---
Also tried with gcc 12.1

>g++-12 --version
g++-12 (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0

```
/usr/bin/g++-12   -fmodules-ts -std=gnu++20 -MD -MT
CMakeFiles/gccice.dir/Foo.cpp.o -MF CMakeFiles/gccice.dir/Foo.cpp.o.d -o
CMakeFiles/gccice.dir/Foo.cpp.o -c /home/brucea/projects/jobs/gccice/Foo.cpp
/home/brucea/projects/jobs/gccice/Foo.cpp:2:8: internal compiler error: in
tree_node, at cp/module.cc:9078
2 | export module Foo;
  |^~
0x65fabd trees_out::tree_node(tree_node*)
../../src/gcc/cp/module.cc:9078
0x78a72b trees_out::core_vals(tree_node*)
../../src/gcc/cp/module.cc:5922
0x78e3bf trees_out::tree_node_vals(tree_node*)
../../src/gcc/cp/module.cc:7072
0x78e3bf trees_out::tree_value(tree_node*)
../../src/gcc/cp/module.cc:8909
0x787354 trees_out::tree_node(tree_node*)
../../src/gcc/cp/module.cc:9107
0x78a72b trees_out::core_vals(tree_node*)
```

[Bug c++/107192] [modules] internal compiler error: Segmentation fault parsing line "module :Bar;"

2022-10-09 Thread tortoise_74 at yahoo dot co.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107192

--- Comment #1 from Bruce Adams  ---
Still occurs if I use gcc 12.1

>g++-12 --version
g++-12 (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0

```
[ 50%] Building CXX object CMakeFiles/gccice.dir/Bar.cpp.o
/usr/bin/g++-12   -fmodules-ts -std=gnu++20 -MD -MT
CMakeFiles/gccice.dir/Bar.cpp.o -MF CMakeFiles/gccice.dir/Bar.cpp.o.d -o
CMakeFiles/gccice.dir/Bar.cpp.o -c /home/brucea/projects/jobs/gccice2/Bar.cpp
/home/brucea/projects/jobs/gccice2/Bar.cpp:8:9: internal compiler error:
Segmentation fault
8 | module :Bar;
  | ^~~
0xd910e3 crash_signal
../../src/gcc/toplev.cc:322
0x7f5f531b851f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x783313 module_state::is_partition() const
../../src/gcc/cp/module.cc:3482
0x783313 get_module(tree_node*, module_state*, bool)
../../src/gcc/cp/module.cc:13782
0x7b3a91 cp_parser_module_name
../../src/gcc/cp/parser.cc:14522
0x7da1e2 cp_parser_module_declaration
../../src/gcc/cp/parser.cc:14595
0x7fa3d3 cp_parser_translation_unit
../../src/gcc/cp/parser.cc:4968
0x7fa3d3 c_parse_file()
../../src/gcc/cp/parser.cc:48068
0x8e6335 c_common_parse_file()
../../src/gcc/c-family/c-opts.cc:1240
```

[Bug libstdc++/106665] Cannot pass barrier by reference

2022-10-09 Thread phosit at autistici dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106665

Phosit  changed:

   What|Removed |Added

 CC||phosit at autistici dot org

--- Comment #2 from Phosit  ---
There is a race condition the threads in pool might access sync_point after
sync_point is destroyed.
If you swap the declarations the the threads in the pool are joined bevore
sync_point is destroyed

[Bug tree-optimization/107195] New: wrong code with "-O1 -fno-tree-ccp" on x86_64-linux-gnu

2022-10-09 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107195

Bug ID: 107195
   Summary: wrong code with "-O1 -fno-tree-ccp" on
x86_64-linux-gnu
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zhendong.su at inf dot ethz.ch
  Target Milestone: ---

This doesn't fail with 12.2, so looks like a recent regression. Perhaps related
to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107172 or
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107194? 

Compiler Explorer: https://godbolt.org/z/94E6r84ra

[524] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/13.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk
--enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib
--with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.0.0 20221009 (experimental) [master r13-3180-ge95e91eccd0] (GCC) 
[525] % 
[525] % gcctk -O1 small.c; ./a.out
[526] % 
[526] % gcctk -O1 -fno-tree-ccp small.c
[527] % ./a.out
Aborted
[528] % 
[528] % cat small.c
int a, b;
int main() {
  int c = 0;
  if (a)
c = 1;
  c = 1 & (a && c) && b;
  if (a) {
b = c;
__builtin_abort ();
  }
  return 0;
}

[Bug tree-optimization/107194] New: wrong code at -O1 on x86_64-linux-gnu

2022-10-09 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107194

Bug ID: 107194
   Summary: wrong code at -O1 on x86_64-linux-gnu
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zhendong.su at inf dot ethz.ch
  Target Milestone: ---

This works for 12.2, so should be a recent regression.

Compiler Explorer: https://godbolt.org/z/7vobTxhG4


[581] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/13.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk
--enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib
--with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.0.0 20221009 (experimental) [master r13-3180-ge95e91eccd0] (GCC) 
[582] % 
[582] % gcctk -O1 small.c
[583] % ./a.out
Aborted
[584] % cat small.c
int a, b;
int main() {
  int c = 0;
  long d;
  for (; b < 1; b++) {
(c && d) & 3 || a;
d = c;
c = -1;
if (d)
  __builtin_abort();
  }
  return 0;
}

[Bug target/106562] PRU: Inefficient code for zero check of 64-bit (boolean) AND result

2022-10-09 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106562

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Dimitar Dimitrov :

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

commit r13-3180-ge95e91eccd022a4a3a86da2749809fbad9afd20e
Author: Dimitar Dimitrov 
Date:   Sun Sep 18 16:27:18 2022 +0300

pru: Add cbranchdi4 pattern

Manually expanding into 32-bit comparisons is much more efficient than
the default expansion into word-size comparisons.  Note that word for PRU
is 8-bit.

PR target/106562

gcc/ChangeLog:

* config/pru/pru-protos.h (pru_noteq_condition): New
function declaration.
* config/pru/pru.cc (pru_noteq_condition): New function.
* config/pru/pru.md (cbranchdi4): Define new pattern.

gcc/testsuite/ChangeLog:

* gcc.target/pru/pr106562-1.c: New test.
* gcc.target/pru/pr106562-2.c: New test.
* gcc.target/pru/pr106562-3.c: New test.
* gcc.target/pru/pr106562-4.c: New test.

Signed-off-by: Dimitar Dimitrov 

[Bug bootstrap/107193] New: [13 regression] bootstrap error caused by r13-3172-gf30e9fd33e56a5

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

Bug ID: 107193
   Summary: [13 regression] bootstrap error caused by
r13-3172-gf30e9fd33e56a5
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: crazylht at gmail dot com
  Target Milestone: ---

Created attachment 53683
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53683=edit
_sd_to_udi.i

export/users2/liuhongt/tools-build/build_git_trunk_master_native_bootstrap/./gcc/xgcc
-B/export/users2/liuhongt/tools-build/build_git_trunk_master_native_bootstrap/./gcc/
-B/export/users2/liuhongt/install/git_trunk_master_native_bootstrap/x86_64-pc-linux-gnu/bin/
-B/export/users2/liuhongt/install/git_trunk_master_native_bootstrap/x86_64-pc-linux-gnu/lib/
-isystem
/export/users2/liuhongt/install/git_trunk_master_native_bootstrap/x86_64-pc-linux-gnu/include
-isystem
/export/users2/liuhongt/install/git_trunk_master_native_bootstrap/x86_64-pc-linux-gnu/sys-include
  -fno-checking -g -O2 -m32 -O2  -g -O2 -DIN_GCC-W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include   -fpic -mlong-double-80
-DUSE_ELF_SYMVER -fcf-protection -mshstk -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection
-mshstk -I. -I. -I../../.././gcc
-I/export/users2/liuhongt/gcc/git_trunk/master/libgcc
-I/export/users2/liuhongt/gcc/git_trunk/master/libgcc/.
-I/export/users2/liuhongt/gcc/git_trunk/master/libgcc/../gcc
-I/export/users2/liuhongt/gcc/git_trunk/master/libgcc/../include
-I/export/users2/liuhongt/gcc/git_trunk/master/libgcc/config/libbid
-DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS  -o _sd_to_udi.o -MT
_sd_to_udi.o -MD -MP -MF _sd_to_udi.dep -DFINE_GRAINED_LIBRARIES -DL_sd_to_udi
-DWIDTH=32 -c
/export/users2/liuhongt/gcc/git_trunk/master/libgcc/config/libbid/_sd_to_udi.c
during GIMPLE pass: cfg
/export/users2/liuhongt/gcc/git_trunk/master/libgcc/config/libbid/_sd_to_udi.c:
In function ‘__bid_fixunssddi’:
/export/users2/liuhongt/gcc/git_trunk/master/libgcc/config/libbid/_sd_to_udi.c:29:1:
internal compiler error: Segmentation fault
   29 | __bid_fixunssddi (_Decimal32 x) {
  | ^~~~
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See  for instructions.
make[5]: *** [Makefile:722: _sd_to_udi.o] Error 1
make[5]: Leaving directory
'/export/users2/liuhongt/tools-build/build_git_trunk_master_native_bootstrap/x86_64-pc-linux-gnu/32/libgcc'
make[4]: *** [Makefile:1214: multi-do] Error 1
make[4]: Leaving directory
'/export/users2/liuhongt/tools-build/build_git_trunk_master_native_bootstrap/x86_64-pc-linux-gnu/libgcc'
make[3]: *** [Makefile:127: all-multi] Error 2
make[3]: Leaving directory
'/export/users2/liuhongt/tools-build/build_git_trunk_master_native_bootstrap/x86_64-pc-linux-gnu/libgcc'
make[2]: *** [Makefile:24226: all-stage2-target-libgcc] Error 2
make[2]: Leaving directory
'/export/users2/liuhongt/tools-build/build_git_trunk_master_native_bootstrap'
make[1]: *** [Makefile:30117: stage2-bubble] Error 2
make[1]: Leaving directory
'/export/users2/liuhongt/tools-build/build_git_trunk_master_native_bootstrap'
make: *** [Makefile:1071: all] Error 2


reproduce with attached testcase

./gcc/xgcc -B ./gcc -O2 _sd_to_udi.i -g -m32

And It looks like there's some random when reproducing.(sometimes pass,
sometimes failed).

[Bug c++/107191] [modules] ICE when importing module partition (internal compiler error: in tree_node, at cp/module.cc:9061)

2022-10-09 Thread tortoise_74 at yahoo dot co.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107191

--- Comment #1 from Bruce Adams  ---
I also produced a different segfault while trying to reproduce this - see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107192

[Bug c++/107192] New: [modules] internal compiler error: Segmentation fault parsing line "module :Bar;"

2022-10-09 Thread tortoise_74 at yahoo dot co.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107192

Bug ID: 107192
   Summary: [modules] internal compiler error: Segmentation fault
parsing line "module :Bar;"
   Product: gcc
   Version: 11.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tortoise_74 at yahoo dot co.uk
  Target Milestone: ---

Created attachment 53682
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53682=edit
Sample code to reproduce segfault

Found while trying to create a reproducer for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107191

When attempting to compile the following code:

```
module;
module :Bar;
```

I got:

```
[ 25%] Building CXX object CMakeFiles/gccice.dir/Bar.cpp.o
/usr/bin/c++   -fmodules-ts -std=gnu++20 -MD -MT
CMakeFiles/gccice.dir/Bar.cpp.o -MF CMakeFiles/gccice.dir/Bar.cpp.o.d -o
CMakeFiles/gccice.dir/Bar.cpp.o -c /home/brucea/projects/jobs/gccice2/Bar.cpp
/home/brucea/projects/jobs/gccice2/Bar.cpp:8:9: internal compiler error:
Segmentation fault
8 | module :Bar;
  | ^~~
0x7f02a38e151f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x7f02a38c8d8f __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
0x7f02a38c8e3f __libc_start_main_impl
../csu/libc-start.c:392
Please submit a full bug report,
with preprocessed source if appropriate.
```

This may or may not be legal code but a segfault is incorrect.

>gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0

[Bug c++/99769] [modules] internal compiler error: in tree_node, at cp/module.cc:9105 when compile module partitions

2022-10-09 Thread tortoise_74 at yahoo dot co.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99769

--- Comment #4 from Bruce Adams  ---
I had a issue I believed to be related but in attempting to create a reproducer
got several different ICEs so I have submitted a separate ticket - see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107191

[Bug c++/107191] New: [modules] ICE when importing module partition (internal compiler error: in tree_node, at cp/module.cc:9061)

2022-10-09 Thread tortoise_74 at yahoo dot co.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107191

Bug ID: 107191
   Summary: [modules] ICE when importing module partition
(internal compiler error: in tree_node, at
cp/module.cc:9061)
   Product: gcc
   Version: 11.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tortoise_74 at yahoo dot co.uk
  Target Milestone: ---

Created attachment 53681
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53681=edit
Sample code to reproduce the above

I have been trying to create a module composed of 2 partitions one of which
imports the other.
This gives me the error as below:

```
[ 25%] Building CXX object CMakeFiles/gccice.dir/Foo.cpp.o
/usr/bin/c++   -fmodules-ts -std=gnu++20 -MD -MT
CMakeFiles/gccice.dir/Foo.cpp.o -MF CMakeFiles/gccice.dir/Foo.cpp.o.d -o
CMakeFiles/gccice.dir/Foo.cpp.o -c /home/brucea/projects/jobs/gccice/Foo.cpp
/home/brucea/projects/jobs/gccice/Foo.cpp:2:8: internal compiler error: in
tree_node, at cp/module.cc:9061
2 | export module Foo;
  |^~
0x7fe43f807d8f __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
0x7fe43f807e3f __libc_start_main_impl
../csu/libc-start.c:392
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
make[2]: *** [CMakeFiles/gccice.dir/build.make:76:
CMakeFiles/gccice.dir/Foo.cpp.o] Error 1
make[2]: Leaving directory '/home/brucea/projects/jobs/gccice/target'
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/gccice.dir/all] Error 2
make[1]: Leaving directory '/home/brucea/projects/jobs/gccice/target'
```

I thought this might be the same as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99769
The line number is different but I am using the ubuntu version of gcc which
might have small differences:

> gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0


In trying to create a reproducer I have encountered different errors:

```
/tmp/codetest/Foo.cpp:2:8: internal compiler error: in tree_node, at
cp/module.cc:9061
2 | export module Foo;
  |^~
0xe3223b internal_error(char const*, ...)
???:0
0xe28d63 fancy_abort(char const*, int, char const*)
???:0
0x9dd5e6 trees_out::tree_node(tree_node*)
???:0
0x9ddbdf trees_out::core_vals(tree_node*)
???:0
0x9de4ba trees_out::tree_node_vals(tree_node*)
???:0
0x9df707 trees_out::tree_value(tree_node*)
???:0
0x9dd60d trees_out::tree_node(tree_node*)
???:0
0x9ddbdf trees_out::core_vals(tree_node*)
???:0
0x9de4ba trees_out::tree_node_vals(tree_node*)
???:0
0x9df707 trees_out::tree_value(tree_node*)
???:0
0x9dd60d trees_out::tree_node(tree_node*)
???:0
0x9ddbdf trees_out::core_vals(tree_node*)
???:0
0x9de4ba trees_out::tree_node_vals(tree_node*)
???:0
0x9df707 trees_out::tree_value(tree_node*)
???:0
0x9dd60d trees_out::tree_node(tree_node*)
???:0
0x9ddbdf trees_out::core_vals(tree_node*)
???:0
0x9de4ba trees_out::tree_node_vals(tree_node*)
???:0
0x9df707 trees_out::tree_value(tree_node*)
???:0
0x9dd60d trees_out::tree_node(tree_node*)
???:0
0x9ddbdf trees_out::core_vals(tree_node*)
???:0
Please submit a full bug report,
```

And by just adding #include :

```
 50%] Building CXX object CMakeFiles/gccice.dir/Snafu.cpp.o
/usr/bin/c++   -fmodules-ts -std=gnu++20 -MD -MT
CMakeFiles/gccice.dir/Snafu.cpp.o -MF CMakeFiles/gccice.dir/Snafu.cpp.o.d -o
CMakeFiles/gccice.dir/Snafu.cpp.o -c /tmp/codetest/Snafu.cpp
In file included from /usr/include/c++/11/bits/locale_classes.h:857,
 from /usr/include/c++/11/bits/ios_base.h:41,
 from /usr/include/c++/11/ios:42,
 from /usr/include/c++/11/istream:38,
 from /usr/include/c++/11/sstream:38,
 from /tmp/codetest/Bar.cpp:7,
of module Foo:Bar, imported at /tmp/codetest/Snafu.cpp:9:
/usr/include/c++/11/bits/locale_classes.tcc: In instantiation of 'const _Facet&
std::use_facet(const std::locale&) [with _Facet =
std::__cxx11::numpunct]':
/usr/include/c++/11/bits/locale_facets.tcc:80:66:   required from 'void
std::__numpunct_cache@Foo:Bar<_CharT>::_M_cache(const std::locale&) [with
_CharT = char]'
/usr/include/c++/11/bits/locale_facets.tcc:63:18:   required from 'const
std::__numpunct_cache@Foo:Bar<_CharT>*
std::__use_cache@Foo:Bar
>::operator()(const std::locale&) const [with _CharT = char]'
/usr/include/c++/11/bits/locale_facets.tcc:384:33:   required from '_InIter
std::num_get<_CharT, _InIter>::_M_extract_int(_InIter, _InIter, std::ios_base&,
std::ios_base::iostate&, _ValueT&) const [with _ValueT = long int; _CharT =
char; _InIter = std::istreambuf_iterator >;
std::ios_base::iostate = 

[Bug c++/107190] New: [aarch64] regression with optimization -fexpensive-optimizations

2022-10-09 Thread zhongyunde at huawei dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107190

Bug ID: 107190
   Summary: [aarch64] regression with optimization
-fexpensive-optimizations
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zhongyunde at huawei dot com
  Target Milestone: ---

This case is simplify from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107090,
and we can see that the codegen of function `test_m` has some regression with
optimization -fexpensive-optimizations, https://gcc.godbolt.org/z/zbKrEox4j

This is because the pass 208t.widening_mul is controlled by
-fexpensive-optimizations (default on at -O3), it conversion

```
  m_12 = m_9 + m1_10;
  if (m1_10 > m_12)
```
into

```
  _17 = .ADD_OVERFLOW (m_9, m1_10);
  m_12 = REALPART_EXPR <_17>;
  _18 = IMAGPART_EXPR <_17>;
  if (_18 != 0)``

```

[Bug c/89549] [10/11/12/13 Regression] -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers

2022-10-09 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549

Eric Gallager  changed:

   What|Removed |Added

 CC||lhyatt at gcc dot gnu.org

--- Comment #24 from Eric Gallager  ---
Lewis Hyatt has been touching some code in this area recently; cc-ing...

[Bug target/107185] [13 Regression] during RTL pass: vregs ICE: in extract_insn, at recog.cc:2791 (unrecognizable insn) with -ffast-math and lrintf()

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

--- Comment #1 from Hongtao.liu  ---
Looks like there's mismatch between

20147(define_expand "lrint2"
20148  [(set (match_operand:SWI48 0 "nonimmediate_operand")
20149 (unspec:SWI48 [(match_operand:MODEF 1 "register_operand")]
20150   UNSPEC_FIX_NOTRUNC))]
20151  "SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH")

and

7770(define_insn "sse_cvtss2si_2"
 7771  [(set (match_operand:SWI48 0 "register_operand" "=r,r")
 7772(unspec:SWI48 [(match_operand:SF 1 "nonimmediate_operand" "v,m")]
 7773  UNSPEC_FIX_NOTRUNC))]
...
...
 8215(define_insn "sse2_cvtsd2si_2"
 8216  [(set (match_operand:SWI48 0 "register_operand" "=r,r")
 8217(unspec:SWI48 [(match_operand:DF 1 "nonimmediate_operand" "v,m")]
 8218  UNSPEC_FIX_NOTRUNC))]
 8219  "TARGET_SSE2"
 8220  "%vcvtsd2si\t{%1, %0|%0, %q1}"

Need to swap predicates for operands[0] and operand[1] of
"lrint2"