[Bug target/100255] Crosscompiler to ia64-hp-vms: vmsdbgout.c:368:20: error: ISO C++17 does not allow 'register' storage class specifier [-Werror=register]

2021-05-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100255

--- Comment #4 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
:

https://gcc.gnu.org/g:14786c8bcec1b90901673f79a6c3ca449815fd9e

commit r10-9792-g14786c8bcec1b90901673f79a6c3ca449815fd9e
Author: Jakub Jelinek 
Date:   Mon Apr 26 09:59:15 2021 +0200

vmsdbgout: Remove useless register keywords

register keyword was removed in C++17, and in vmsdbgout.c it served no
useful purpose.

2021-04-26  Jakub Jelinek  

PR debug/100255
* vmsdbgout.c (ASM_OUTPUT_DEBUG_STRING, vmsdbgout_begin_block,
vmsdbgout_end_block, lookup_filename, vmsdbgout_source_line):
Remove
register keywords.

(cherry picked from commit 297bfacdb448c0d29b8dfac2818350b90902bc75)

[Bug tree-optimization/23330] FIXME from passes.c: pass_may_alias should be a TODO item

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23330
Bug 23330 depends on bug 23659, which changed state.

Bug 23659 Summary: Should able to add dereferencing (statements with VUSE) 
without rerunning may_alias
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23659

   What|Removed |Added

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

[Bug tree-optimization/23659] Should able to add dereferencing (statements with VUSE) without rerunning may_alias

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23659

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #6 from Richard Biener  ---
Fixed a long time ago.

[Bug classpath/13603] [meta-bug] Java security model tracking PR

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13603
Bug 13603 depends on bug 21890, which changed state.

Bug 21890 Summary: SecurityManager is incomplete
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21890

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |MOVED

[Bug classpath/21890] SecurityManager is incomplete

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21890

Richard Biener  changed:

   What|Removed |Added

 Resolution|--- |MOVED
 Status|ASSIGNED|RESOLVED

--- Comment #4 from Richard Biener  ---
moved

[Bug target/7625] gcc pessimized 64-bit % operator on hppa2.0

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7625

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW

[Bug sanitizer/89764] [8 Regression] ubsan diagnostic on generic lambdas decayed to function pointers

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89764

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW

[Bug c++/89357] [8 regression][C++11] alignas for automatic variables with alignment greater than 16 fails

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89357

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW

[Bug target/100375] [12 Regression] trunk 20210501 ftbfs for nvptx-none

2021-05-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100375

--- Comment #8 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
:

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

commit r11-8346-gda9c085ddbfe61e5954c8ec4e996240fa3a994c0
Author: Jakub Jelinek 
Date:   Sun May 2 14:17:23 2021 +0200

nvptx: Fix up nvptx build against latest libstdc++ [PR100375]

The r12-220-gd96db15967e78d7cecea3b1cf3169ceb924678ac change
deprecated some non-standard std::pair constructors and that apparently
broke nvptx.c build, where pseudo_node_t is std::pair
and so nullptr (or NULL) needs to be used for the first argument of the
ctors instead of 0.

2021-05-02  Jakub Jelinek  

PR target/100375
* config/nvptx/nvptx.c (nvptx_sese_pseudo): Use nullptr instead of
0
as first argument of pseudo_node_t constructors.

(cherry picked from commit 7911a905276781c20f704f5a91b5125e0184d072)

[Bug c++/100412] [11/12 regression] PASS & FAIL for same test aarch64-qemu: gcc.dg/Wvla-parameter-[23].c pr?????

2021-05-04 Thread schwab--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100412

--- Comment #1 from Andreas Schwab  ---
Or just change the test name to make it unique.

[Bug c++/91993] [8/9 Regression] Spurious -Wconversion warning with -fsanitize=undefined since r6-4886-gcda0a029f45d20f4

2021-05-04 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91993

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|8.5 |10.0
 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #8 from Jakub Jelinek  ---
Not going to backport, so fixed for 10.1+.

[Bug c++/91759] [8/9 Regression] g++ accepts ill-formed deduction guides in wrong scope since r7-6608

2021-05-04 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91759

Jakub Jelinek  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
   Target Milestone|8.5 |10.0

--- Comment #7 from Jakub Jelinek  ---
Not going to backport. Fixed for 10.1 and later.

[Bug target/89775] [8 Regression] S/390: Stackpointer save/restore instructions optimized away

2021-05-04 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89775

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|8.5 |8.4
 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #7 from Jakub Jelinek  ---
I think this has been fixed already for 8.4.

[Bug tree-optimization/100414] [11/12 Regression] ICE: in dominated_by_p, at dominance.c:1120 with -O -fno-tree-dce -fno-tree-dse

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100414

Richard Biener  changed:

   What|Removed |Added

Summary|[12 Regression] ICE: in |[11/12 Regression] ICE: in
   |dominated_by_p, at  |dominated_by_p, at
   |dominance.c:1120 with -O|dominance.c:1120 with -O
   |-fno-tree-dce -fno-tree-dse |-fno-tree-dce -fno-tree-dse
   Target Milestone|12.0|11.2

--- Comment #2 from Richard Biener  ---
Caused by g:fd61ca67f97acc5462d02676380af92329c37bb2 which added dominance
checks w/o ensuring dominators are available.

[Bug tree-optimization/100414] [12 Regression] ICE: in dominated_by_p, at dominance.c:1120 with -O -fno-tree-dce -fno-tree-dse

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100414

Richard Biener  changed:

   What|Removed |Added

   Last reconfirmed||2021-05-04
 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Target Milestone|--- |12.0

--- Comment #1 from Richard Biener  ---
Mine.

[Bug libstdc++/100384] Compiling in c++17 mode breaks compilation of functions named visit()

2021-05-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100384

--- Comment #7 from CVS Commits  ---
The master branch has been updated by Jonathan Wakely :

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

commit r12-436-gaf5b2b911dd80ae9cc87404b7e7ab807cf6655d4
Author: Jonathan Wakely 
Date:   Tue May 4 12:16:46 2021 +0100

libstdc++: Do not use deduced return type for std::visit [PR 100384]

This avoids errors outside the immediate context when std::visit is an
overload candidate because of ADL, but not actually viable.

The solution is to give std::visit a non-deduced return type. New
helpers are introduced for that, and existing ones refactored slightly.

libstdc++-v3/ChangeLog:

PR libstdc++/100384
* include/std/variant (__get_t): New alias template yielding the
return type of std::get on a variant.
(__visit_result_t): New alias template yielding the result of
std::visit.
(__same_types): Move into namespace __detail::__variant.
(__check_visitor_results): Likewise. Use __invoke_result_t and
__get_t.
(__check_visitor_result): Remove.
(visit): Use __visit_result_t for return type.
* testsuite/20_util/variant/100384.cc: New test.

[Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057

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

--- Comment #5 from rguenther at suse dot de  ---
On Tue, 4 May 2021, iains at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373
> 
> --- Comment #4 from Iain Sandoe  ---
> (In reply to Iain Sandoe from comment #3)
> > (In reply to Richard Biener from comment #2)
> > > Doesn't reproduce on x86_64-linux with bootstrapping with in-tree mpfr 
> > > 4.1.0
> > 
> > it might well be some corner-case, but Darwin is PIC by default, so it might
> > be worth trying --with-pic ?
> 
> and -gstrict-dwarf, -gdwarf-2

That shouldn't really matter.  If you have preprocessed source of
a miscomparing object and you can reproduce with that and
-fcompare-debug + options that would be a good first step.
Then creduce the result and look where it differs in code generation.

[Bug tree-optimization/100414] New: [12 Regression] ICE: in dominated_by_p, at dominance.c:1120 with -O -fno-tree-dce -fno-tree-dse

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

Bug ID: 100414
   Summary: [12 Regression] ICE: in dominated_by_p, at
dominance.c:1120 with -O -fno-tree-dce -fno-tree-dse
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu

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

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -fno-tree-dce -fno-tree-dse testcase.c
during GIMPLE pass: phiopt
testcase.c: In function 'foo0':
testcase.c:3:1: internal compiler error: in dominated_by_p, at dominance.c:1120
3 | foo (void)
  | ^~~~
0x6511a8 dominated_by_p(cdi_direction, basic_block_def const*, basic_block_def
const*)
/repo/gcc-trunk/gcc/dominance.c:1120
0x11f5f0b factor_out_conditional_conversion
/repo/gcc-trunk/gcc/tree-ssa-phiopt.c:507
0x11f5f0b tree_ssa_phiopt_worker
/repo/gcc-trunk/gcc/tree-ssa-phiopt.c:327
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug ipa/100413] New: [11/12 Regression] ICE: failed to reclaim unneeded function with custom flags

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

Bug ID: 100413
   Summary: [11/12 Regression] ICE: failed to reclaim unneeded
function with custom flags
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
CC: marxin at gcc dot gnu.org
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu

Created attachment 50747
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50747=edit
auto-reduced testcase (from OpenTTD sources)

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O2 -fno-guess-branch-probability
-fno-inline-functions-called-once -fipa-cp-clone -fipa-pta
-fnon-call-exceptions --param=ipa-cp-eval-threshold=0 testcase.C 
_ZN12_Vector_base13_M_deallocateEv/6 (void _Vector_base::_M_deallocate())
@0x7fb58e54c880
  Type: function
  Body removed by symtab_remove_unreachable_nodes
  Visibility: externally_visible public weak comdat
comdat_group:_ZN12_Vector_base13_M_deallocateEv one_only
  References: 
  Referring: 
  Availability: not_available
  Function flags: body
  Called by: 
  Calls: 
testcase.C:60:73: internal compiler error: failed to reclaim unneeded function
   60 | ClientNetworkContentSocketHandler::ClientNetworkContentSocketHandler()
{}
  |
^
0xe9f7ce mark_functions_to_output
/repo/gcc-trunk/gcc/cgraphunit.c:1651
0xe9f7ce symbol_table::compile()
/repo/gcc-trunk/gcc/cgraphunit.c:2321
0xea2007 symbol_table::compile()
/repo/gcc-trunk/gcc/cgraphunit.c:2269
0xea2007 symbol_table::finalize_compilation_unit()
/repo/gcc-trunk/gcc/cgraphunit.c:2537
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-429-20210504051736-g00d8545d705-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
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 --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-429-20210504051736-g00d8545d705-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20210504 (experimental) (GCC)

[Bug tree-optimization/86259] [8 Regression] min(4, strlen(s)) optimized to strlen(s) with -flto

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86259

--- Comment #39 from Richard Biener  ---
Martin - this is another one, is there sth simple safe that can be done on the
8 branch?

[Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057

2021-05-04 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #4 from Iain Sandoe  ---
(In reply to Iain Sandoe from comment #3)
> (In reply to Richard Biener from comment #2)
> > Doesn't reproduce on x86_64-linux with bootstrapping with in-tree mpfr 4.1.0
> 
> it might well be some corner-case, but Darwin is PIC by default, so it might
> be worth trying --with-pic ?

and -gstrict-dwarf, -gdwarf-2

(I do plan to bump the default to DWARF-4 for macOS 10.10+ during GCC12 but
it's tricky on the older systems without configury tests for suitable dsymutil
- those are written and mostly tested, but still in my Q)

[Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057

2021-05-04 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #3 from Iain Sandoe  ---
(In reply to Richard Biener from comment #2)
> Doesn't reproduce on x86_64-linux with bootstrapping with in-tree mpfr 4.1.0

it might well be some corner-case, but Darwin is PIC by default, so it might be
worth trying --with-pic ?

failing that, I'll have to figure out some way to debug it...

(the CPU was not, in the end relevant, it was more that on the older machines I
hadn't updated GMP & friends to newer versions.)

[Bug tree-optimization/85887] [8 Regression] Missing DW_TAG_lexical_block PC range

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85887

Richard Biener  changed:

   What|Removed |Added

 Resolution|--- |FIXED
  Known to fail||8.3.1
   Target Milestone|8.5 |8.4
 Status|ASSIGNED|RESOLVED

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

[Bug c++/100412] New: [11/12 regression] PASS & FAIL for same test aarch64-qemu: gcc.dg/Wvla-parameter-[23].c pr?????

2021-05-04 Thread rearnsha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100412

Bug ID: 100412
   Summary: [11/12 regression] PASS & FAIL for same test
aarch64-qemu: gcc.dg/Wvla-parameter-[23].c pr?
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rearnsha at gcc dot gnu.org
  Target Milestone: ---

contrig/test_summary on Arm and AArch64 shows both PASS and FAIL with the same
summary line.  

Tests that now fail, but worked before (6 tests):

aarch64-qemu: gcc.dg/Wvla-parameter-2.c pr? (test for warnings, line 40)
aarch64-qemu: gcc.dg/Wvla-parameter-2.c pr? (test for warnings, line 42)
aarch64-qemu: gcc.dg/Wvla-parameter-2.c pr? (test for warnings, line 44)
aarch64-qemu: gcc.dg/Wvla-parameter-2.c pr? (test for warnings, line 46)
aarch64-qemu: gcc.dg/Wvla-parameter-3.c pr? (test for warnings, line 35)
aarch64-qemu: gcc.dg/Wvla-parameter-3.c pr? (test for warnings, line 39)

Tests that now work, but didn't before (6 tests):

aarch64-qemu: gcc.dg/Wvla-parameter-2.c pr? (test for warnings, line 40)
aarch64-qemu: gcc.dg/Wvla-parameter-2.c pr? (test for warnings, line 42)
aarch64-qemu: gcc.dg/Wvla-parameter-2.c pr? (test for warnings, line 44)
aarch64-qemu: gcc.dg/Wvla-parameter-2.c pr? (test for warnings, line 46)
aarch64-qemu: gcc.dg/Wvla-parameter-3.c pr? (test for warnings, line 35)
aarch64-qemu: gcc.dg/Wvla-parameter-3.c pr? (test for warnings, line 39)

It looks like these tests really do have two tests that try to refer to the
same line (one of which is an XFAIL), but this breaks the summary reporter.

Is there a way of reworking this test to remove these bogus reports, perhaps by
duplicating the declarations on separate lines so instead of:

void f (int[n1][2][n3][4][n5][6][*][8][n9]);   // { dg-warning "argument 1 of
type 'int\\\[n1]\\\[2]\\\[n3]\\\[4]\\\[n5]\\\[6]\\\[\\\*]\\\[8]\\\[n9]'
declared with 1 unspecified variable bound" "pr?" { xfail *-*-* } }
// { dg-warning "argument 1 of type
'int\\\[n1]\\\[2]\\\[n3]\\\[4]\\\[n5]\\\[6]\\\[0]\\\[8]\\\[n9]' declared with 1
unspecified variable bound" "pr?" { target *-*-* } .-1 }


We have:

void f (int[n1][2][n3][4][n5][6][*][8][n9]);   // { dg-warning "argument 1 of
type 'int\\\[n1]\\\[2]\\\[n3]\\\[4]\\\[n5]\\\[6]\\\[\\\*]\\\[8]\\\[n9]'
declared with 1 unspecified variable bound" "pr?" { xfail *-*-* } }
void g (int[n1][2][n3][4][n5][6][*][8][n9]);  // { dg-warning "argument 1 of
type 'int\\\[n1]\\\[2]\\\[n3]\\\[4]\\\[n5]\\\[6]\\\[0]\\\[8]\\\[n9]' declared
with 1 unspecified variable bound" "pr?" { target *-*-* } }

[Bug tree-optimization/100329] ICE: verify_ssa failed (error: definition in block 3 does not dominate use in block 4)

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100329

Richard Biener  changed:

   What|Removed |Added

  Known to work||12.0
   Keywords|needs-bisection |

--- Comment #8 from Richard Biener  ---
Fixed on trunk sofar.

[Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #2 from Richard Biener  ---
Doesn't reproduce on x86_64-linux with bootstrapping with in-tree mpfr 4.1.0

[Bug tree-optimization/100398] [12 Regression] ICE in gimple_redirect_edge_and_branch, at tree-cfg.c:6082

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100398

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/100329] ICE: verify_ssa failed (error: definition in block 3 does not dominate use in block 4)

2021-05-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100329

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

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

commit r12-431-ga310bb73edc9548e08d1fa28e7a56246caf27757
Author: Richard Biener 
Date:   Tue May 4 10:07:35 2021 +0200

tree-optimization/100329 - avoid reassociating asm goto defs

This avoids reassociating asm goto defs because we have no idea
on which outgoing edge to insert defs.

2021-05-04  Richard Biener  

PR tree-optimization/100329
* tree-ssa-reassoc.c (can_reassociate_p): Do not reassociate
asm goto defs.
(insert_stmt_after): Assert we're not running into asm goto.

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

[Bug tree-optimization/100398] [12 Regression] ICE in gimple_redirect_edge_and_branch, at tree-cfg.c:6082

2021-05-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100398

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

https://gcc.gnu.org/g:2326627eb19d8c21251fd60479f1a190621c475b

commit r12-430-g2326627eb19d8c21251fd60479f1a190621c475b
Author: Richard Biener 
Date:   Tue May 4 09:18:11 2021 +0200

tree-optimization/100398 - avoid DSE of control flow stmt

The following makes sure to preserve control altering stmts
when removing trivially dead stmts in DSE.

2021-05-04  Richard Biener  

PR tree-optimization/100398
* tree-ssa-dse.c (pass_dse::execute): Preserve control
altering stmts.

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

[Bug rtl-optimization/100230] ASan: alloc-dealloc-mismatch in early-remat.c

2021-05-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100230

--- Comment #5 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Alex Coplan
:

https://gcc.gnu.org/g:9225a497de15bf3e8beb8df402e1b8cf9ba2b8ac

commit r10-9791-g9225a497de15bf3e8beb8df402e1b8cf9ba2b8ac
Author: Alex Coplan 
Date:   Fri Apr 23 14:09:15 2021 +0100

early-remat.c: Fix new/delete mismatch [PR100230]

This simple patch fixes a mistmatched operator new/delete in
early-remat.c which triggers ASan errors on (at least) AArch64 when
compiling SVE code.

gcc/ChangeLog:

PR rtl-optimization/100230
* early-remat.c (early_remat::sort_candidates): Use delete[]
instead of delete for array allocated with new[].

(cherry picked from commit 5d87c2251c441f056e0a44f928ffcb8a8a679b6b)

[Bug c++/100396] [11.1 regression] The template function overload is not selected correctly

2021-05-04 Thread vopl at bk dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100396

--- Comment #4 from vopl at bk dot ru ---
I understand what you're saying. But, apparently, there is still corruption in
the calculus of the substituted Args, please look at this code (thanks to  
 johny5):

/0/1/2/3/4/5/6/7
template struct Checker
{
using Some = decltype(F{}(Args{}...));
};

template concept valid =
requires { typename Checker::Some; };

/0/1/2/3/4/5/6/7
template auto ovr(F f, Args... args)
requires valid
{
return ovr(int{}, f, args...);
}

template auto ovr(int, F f, Args... args)
{
return f(args...);
}

/0/1/2/3/4/5/6/7
void use()
{
ovr([](double){}, 2.);
}
---

: In instantiation of 'struct Checker, double,
double>':
:8:25:   required by substitution of 'template
auto ovr(F, Args ...) requires  valid [with F =
use()::; Args = {double, double}]'
:14:27:   required from 'auto ovr(F, Args ...) requires  valid [with F = use()::; Args = {double}]'
:25:8:   required from here
:4:30: error: no match for call to '(use()::) (double,
double)'
4 | using Some = decltype(F{}(Args{}...));
  |   ~~~^~~
:4:30: note: candidate: 'void (*)(double)' (conversion)
:4:30: note:   candidate expects 2 arguments, 3 provided
:25:9: note: candidate: 'use()::'
   25 | ovr([](double){}, 2.);
  | ^
:25:9: note:   candidate expects 1 argument, 2 provided


Take attention at 'Args' - it was {double} initially, but becomes {double,
double} for second ovr call

[Bug c/100410] [10 regression] optimization bug with -O3 -fno-strict-aliasing

2021-05-04 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100410

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|10.4|10.3

[Bug middle-end/94994] [10 Regression] possible miscompilation of word-at-a-time copy via packed structs

2021-05-04 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94994

Jakub Jelinek  changed:

   What|Removed |Added

 CC||chantry.xavier at gmail dot com

--- Comment #8 from Jakub Jelinek  ---
*** Bug 100410 has been marked as a duplicate of this bug. ***

[Bug c/100410] [10 regression] optimization bug with -O3 -fno-strict-aliasing

2021-05-04 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100410

Jakub Jelinek  changed:

   What|Removed |Added

   Keywords|needs-bisection |
 Resolution|--- |DUPLICATE
   Target Milestone|--- |10.4
 Status|UNCONFIRMED |RESOLVED
 CC||jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  ---
Bisection shows this started with
r10-4803-g8489e1f45b50600c01eb8ed8c5d0ca914ded281c
and disappeared with
r11-6380-g9fa5b473b5b8e289b6542adfd5cfaddfb3036048

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

[Bug target/100411] GCC 11 branch bootstrap ICE on x86_w64-w64-mingw32

2021-05-04 Thread lh_mouse at 126 dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100411

--- Comment #2 from Liu Hao  ---
(In reply to Eric Botcazou from comment #1)
> Can you post the configure line?

As you wish, but it is very long (I have no idea why they have been there):

```
  $ ../gcc/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local
--build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32
--target=x86_64-w64-mingw32
--with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include
--libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64
--with-tune=nocona --enable-languages=c,lto,c++ --enable-shared --enable-static
--enable-threads=mcf --enable-graphite --enable-fully-dynamic-string
--enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug
--enable-libstdcxx-filesystem-ts=yes --disable-isl-version-check --enable-lto
--enable-libgomp --disable-multilib --enable-checking=release --disable-rpath
--disable-win32-registry --enable-nls --disable-werror --disable-symvers
--with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64
--with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion=GCC with MCF thread
model, built by LH_Mouse. --with-bugurl=https://gcc-mcf.lhmouse.com/
--with-gnu-as --with-gnu-ld --with-boot-ldflags=-pipe
-Wl,--dynamicbase,--high-entropy-va,--nxcompat,--default-image-base-high
-Wl,--disable-dynamicbase,--default-image-base-low -static-libstdc++
-static-libgcc LDFLAGS_FOR_TARGET=-pipe
-Wl,--dynamicbase,--high-entropy-va,--nxcompat,--default-image-base-high
--enable-linker-plugin-flags=LDFLAGS=-static-libstdc++\ -static-libgcc\ -pipe\
-Wl,--dynamicbase,--high-entropy-va,--nxcompat,--default-image-base-high\
-Wl,--stack,12582912 --disable-tls --enable-plugin
```

The PKGBUILD script can be found at
.

[Bug c/100410] [10 regression] optimization bug with -O3 -fno-strict-aliasing

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100410

Richard Biener  changed:

   What|Removed |Added

   Keywords||needs-bisection
 CC||rguenth at gcc dot gnu.org
Version|unknown |10.2.0
  Known to work||10.3.0, 11.1.0, 9.3.0

--- Comment #3 from Richard Biener  ---
Depends on what fixed it.

[Bug target/100411] GCC 11 branch bootstrap ICE on x86_w64-w64-mingw32

2021-05-04 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100411

Eric Botcazou  changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu.org
 Ever confirmed|0   |1
   Last reconfirmed||2021-05-04
 Status|UNCONFIRMED |WAITING

--- Comment #1 from Eric Botcazou  ---
Can you post the configure line?

[Bug c/100410] [10 regression] optimization bug with -O3 -fno-strict-aliasing

2021-05-04 Thread chantry.xavier at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100410

--- Comment #2 from Xavier  ---
It looks like it's already fixed in 10.3 and 11.1 :
https://godbolt.org/z/W98edbPEx

Do you confirm the code is correct, and it was a bug of 10.1 and 10.2 only ?

[Bug target/100411] GCC 11 branch bootstrap ICE on x86_w64-w64-mingw32

2021-05-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100411

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |11.2
   Keywords||build, ice-on-valid-code
  Component|bootstrap   |target

[Bug c/100410] [10 regression] optimization bug with -O3 -fno-strict-aliasing

2021-05-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100410

--- Comment #1 from Andrew Pinski  ---
I think you need align(1) also and not just packed attribute.

[Bug tree-optimization/100329] ICE: verify_ssa failed (error: definition in block 3 does not dominate use in block 4)

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100329

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #6 from Richard Biener  ---
I have a patch along that line.

[Bug tree-optimization/100329] ICE: verify_ssa failed (error: definition in block 3 does not dominate use in block 4)

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100329

--- Comment #5 from Richard Biener  ---
I don't think we can have any reasonable placement decision at that point. 
Which leaves to reject operands defined in asm goto for reassociation - not too
bad I guess.

[Bug tree-optimization/100329] ICE: verify_ssa failed (error: definition in block 3 does not dominate use in block 4)

2021-05-04 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100329

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  ---
Started to ICE with r11-5002-ge3b3b59683c1e7d31a9d313dd97394abebf644be
when the support for output operands on asm goto has been added, before that it
has been rejected:
pr100329.c: In function ‘foo’:
pr100329.c:8:17: error: expected ‘:’ before string constant
8 |   asm goto ("" : "=r" (x) : : : lab);
  | ^
  | :

[Bug bootstrap/100411] New: GCC 11 branch bootstrap ICE on x86_w64-w64-mingw32

2021-05-04 Thread lh_mouse at 126 dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100411

Bug ID: 100411
   Summary: GCC 11 branch bootstrap ICE on x86_w64-w64-mingw32
   Product: gcc
   Version: 11.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: lh_mouse at 126 dot com
  Target Milestone: ---

(i686-w64-mingw32 succeeded.)

/d/lh_mouse/GitHub/MINGW-packages-dev/mingw-w64-gcc-git/src/build-x86_64-w64-mingw32/./prev-gcc/xg++
-B/d/lh_mouse/GitHub/MINGW-packages-dev/mingw-w64-gcc-git/src/build-x86_64-w64-mingw32/./prev-gcc/
-B/mingw64/x86_64-w64-mingw32/bin/ -nostdinc++
-B/d/lh_mouse/GitHub/MINGW-packages-dev/mingw-w64-gcc-git/src/build-x86_64-w64-mingw32/prev-x86_64-w64-mingw32/libstdc++-v3/src/.libs
-B/d/lh_mouse/GitHub/MINGW-packages-dev/mingw-w64-gcc-git/src/build-x86_64-w64-mingw32/prev-x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs

-I/d/lh_mouse/GitHub/MINGW-packages-dev/mingw-w64-gcc-git/src/build-x86_64-w64-mingw32/prev-x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32

-I/d/lh_mouse/GitHub/MINGW-packages-dev/mingw-w64-gcc-git/src/build-x86_64-w64-mingw32/prev-x86_64-w64-mingw32/libstdc++-v3/include

-I/d/lh_mouse/GitHub/MINGW-packages-dev/mingw-w64-gcc-git/src/gcc/libstdc++-v3/libsupc++
-L/d/lh_mouse/GitHub/MINGW-packages-dev/mingw-w64-gcc-git/src/build-x86_64-w64-mingw32/prev-x86_64-w64-mingw32/libstdc++-v3/src/.libs
-L/d/lh_mouse/GitHub/MINGW-packages-dev/mingw-w64-gcc-git/src/build-x86_64-w64-mingw32/prev-x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs
 -fno-PIE -c   -g -O2 -D__USE_MINGW_ACCESS -Wno-pedantic-ms-format
-fno-checking -gtoggle -D__USE_MINGW_ACCESS -DIN_GCC -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc
-I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include
-I../../gcc/gcc/../libcody -I/mingw64/include -I/mingw64/include
-I/mingw64/include  -I../../gcc/gcc/../libdecnumber
-I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber
-I../../gcc/gcc/../libbacktrace -I/mingw64/include -D__USE_MINGW_ANSI_STDIO=1
-I/mingw64/include -o tree-sra.o -MT tree-sra.o -MMD -MP -MF
./.deps/tree-sra.TPo ../../gcc/gcc/tree-sra.c
during RTL pass: final
../../gcc/gcc/tree-sra.c: In function 'bool
path_comparable_for_same_access(tree)':
../../gcc/gcc/tree-sra.c:1983:1: internal compiler error: in
seh_emit_stackalloc, at config/i386/winnt.c:1056
 1983 | }
  | ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[3]: *** [Makefile:1142: tree-sra.o] Error 1
make[3]: Leaving directory
'/d/lh_mouse/GitHub/MINGW-packages-dev/mingw-w64-gcc-git/src/build-x86_64-w64-mingw32/gcc'
make[2]: *** [Makefile:4833: all-stage2-gcc] Error 2
make[2]: Leaving directory
'/d/lh_mouse/GitHub/MINGW-packages-dev/mingw-w64-gcc-git/src/build-x86_64-w64-mingw32'
make[1]: *** [Makefile:24280: stage2-bubble] Error 2
make[1]: Leaving directory
'/d/lh_mouse/GitHub/MINGW-packages-dev/mingw-w64-gcc-git/src/build-x86_64-w64-mingw32'
make: *** [Makefile:1013: all] Error 2

[Bug tree-optimization/100329] ICE: verify_ssa failed (error: definition in block 3 does not dominate use in block 4)

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100329

--- Comment #3 from Richard Biener  ---
So we run into

static void
insert_stmt_after (gimple *stmt, gimple *insert_point)
{
...
  else
/* We assume INSERT_POINT is a SSA_NAME_DEF_STMT of some SSA_NAME,
   thus if it must end a basic block, it should be a call that can
   throw, or some assignment that can throw.  If it throws, the LHS
   of it will not be initialized though, so only valid places using
   the SSA_NAME should be dominated by the fallthru edge.  */
bb = find_fallthru_edge (gimple_bb (insert_point)->succs)->dest;

but for the asm goto the above is not valid.

[Bug tree-optimization/100329] ICE: verify_ssa failed (error: definition in block 3 does not dominate use in block 4)

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100329

Richard Biener  changed:

   What|Removed |Added

 Target|aarch64-linux-gnu   |

--- Comment #2 from Richard Biener  ---
Also ICEs on x86_64 with -O -fwrapv --param tree-reassoc-width=2.  For
dg-torture and not needing -fwrapv:

/* { dg-do compile } */
/* { dg-additional-options "--param tree-reassoc-width=2" } */

unsigned int a0;

unsigned int
foo (unsigned int a1, unsigned int a2)
{
  unsigned int x;

  asm goto ("" : "=r" (x) : : : lab);
  a0 = x;

 lab:
  return x + a1 + a2 + 1;
}

[Bug tree-optimization/100366] spurious warning - std::vector::clear followed by std::vector::insert(vec.end(), ...) with -O2

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100366

--- Comment #4 from Richard Biener  ---
The issue is that FRE sees

   [local count: 1073741824]:
  _6 = vec_2(D)->D.33436._M_impl.D.32749._M_start;
  _7 = vec_2(D)->D.33436._M_impl.D.32749._M_finish;
  if (_6 != _7)
goto ; [70.00%]
  else
goto ; [30.00%]

   [local count: 751619281]:
  vec_2(D)->D.33436._M_impl.D.32749._M_finish = _6;

   [local count: 1073741824]:
  _5 = MEM[(char * const &)vec_2(D) + 8];

so clearly _5 is _not_ equal to _7 but on the path 2 -> 3 -> 4 it is equal to
_6.
Only PRE transforms the load in _5 to a select of both (a PHI node):

   [local count: 1073741824]:
  _6 = vec_2(D)->D.33436._M_impl.D.32749._M_start;
  _7 = vec_2(D)->D.33436._M_impl.D.32749._M_finish;
  if (_6 != _7)
goto ; [70.00%]
  else
goto ; [30.00%]

   [local count: 322122544]:
  _86 = _7 - _6;
  _125 = (sizetype) _86;
  goto ; [100.00%]

   [local count: 751619281]:
  vec_2(D)->D.33436._M_impl.D.32749._M_finish = _6;

   [local count: 1073741824]:
  # prephitmp_141 = PHI <_7(3), _6(4)>
  # prephitmp_83 = PHI <_86(3), 0(4)>
  # prephitmp_65 = PHI <_125(3), 0(4)>
  _21 = vec_2(D)->D.33436._M_impl.D.32749._M_end_of_storage;

PRE also removes some partial redundancies here (the other two PHIs).

[Bug c/100410] New: [10 regression] optimization bug with -O3 -fno-strict-aliasing

2021-05-04 Thread chantry.xavier at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100410

Bug ID: 100410
   Summary: [10 regression] optimization bug with -O3
-fno-strict-aliasing
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: chantry.xavier at gmail dot com
  Target Milestone: ---

Created attachment 50746
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50746=edit
testcase

We have a bug in our lzo decompressing code when switching to Debian 11 (still
not released) which has gcc version 10.2.1 20210110

We use -O2 and several optim flags from -O3. The code worked well with all
previous versions of gcc, including gcc version 9.3.0. It also works with
several versions of clang.

I am attaching a testcase that seems to reproduce the problem.

Compile with gcc -O3 -fno-strict-aliasing -Wall testcase.c

% gcc -O2 -fno-strict-aliasing -Wall testcase.c
   
% ./a.out 15 40
   
`aaa`
% gcc -O3 -fno-strict-aliasing -Wall testcase.c
   
% ./a.out 15 40
   
`aa`

% valgrind ./a.out 15 40
==321763== Memcheck, a memory error detector
==321763== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==321763== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==321763== Command: ./a.out 15 40
==321763==
==321763== Conditional jump or move depends on uninitialised value(s)
==321763==at 0x483BC98: strlen (vg_replace_strmem.c:459)
==321763==by 0x48CDF75: __vfprintf_internal (vfprintf-internal.c:1688)
==321763==by 0x48B8D9A: printf (printf.c:33)
==321763==by 0x1091E3: main (in
/home/xavier/dev/master/platform/lib-common/tests/a.out)
==321763==  Uninitialised value was created by a stack allocation
==321763==at 0x109086: main (in
/home/xavier/dev/master/platform/lib-common/tests/a.out)
==321763==
`aa`

Using -fno-strict-aliasing does not seem to have an impact, but since this code
violates the strict aliasing rule, maybe it has something to do with it ?

I do not fully understand the generated assembly but I see a difference here.
This might be the condition to enable the copy by block of 16 bytes with movdqa
/ movups ?

--   0x10c3 <+83>:>---mov%rax,%r8
--   0x10c6 <+86>:>---lea(%rax,%rbp,1),%rdx
--   0x10ca <+90>:>---cmp$0x7,%r12d
--   0x10ce <+94>:>---jbe0x11a5 
--   0x10d4 <+100>:>--lea-0x8(%r12),%ecx
--   0x10d9 <+105>:>--cmp$0x1f,%ecx
--   0x10dc <+108>:>--jbe0x118c 
--   0x10e2 <+114>:>--cmp$0x8,%rbp
--   0x10e6 <+118>:>--je 0x118c 

[Bug testsuite/100397] New test case libgomp.fortran/depobj-1.f90 fails erratically since its introduction in r12-20

2021-05-04 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100397

Tobias Burnus  changed:

   What|Removed |Added

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

--- Comment #2 from Tobias Burnus  ---
FIXED - thanks for the report.

[Bug tree-optimization/100404] Unable to disable removal of null pointer checks for nonnull function arguments

2021-05-04 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100404

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  ---
nonnull attribute e.g. for VRP/ranger means that the pointer is ~[0,0],
regardless of -f{,no-}delete-null-pointer-checks.  Don't use nonnull attribute
if the argument can be NULL?  Because calling it with NULL in that case is UB.

[Bug testsuite/100397] New test case libgomp.fortran/depobj-1.f90 fails erratically since its introduction in r12-20

2021-05-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100397

--- Comment #1 from CVS Commits  ---
The master branch has been updated by Tobias Burnus :

https://gcc.gnu.org/g:08fff201c92109b5476a4cc211c71de557ec87b1

commit r12-399-g08fff201c92109b5476a4cc211c71de557ec87b1
Author: Tobias Burnus 
Date:   Tue May 4 09:22:36 2021 +0200

OpenMP/Fortran - fix pasto + testcase in depobj [PR100397]

gcc/fortran/ChangeLog:

PR testsuite/100397
* trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.

libgomp/ChangeLog:

PR testsuite/100397
* testsuite/libgomp.fortran/depobj-1.f90 (dep2, dep3): Move var
declaration to scope of non-'depend'-guarded assignment to avoid
races.

[Bug tree-optimization/100404] Unable to disable removal of null pointer checks for nonnull function arguments

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100404

Richard Biener  changed:

   What|Removed |Added

   Last reconfirmed||2021-05-04
 Ever confirmed|0   |1
   Severity|normal  |enhancement
 Status|UNCONFIRMED |NEW

--- Comment #3 from Richard Biener  ---
Hmm, OK, looks like -fno-delete-null-pointer-checks doesn't cover nonnull
marked pointers even if that's not obvious.  Quoting:

@item -fdelete-null-pointer-checks
@opindex fdelete-null-pointer-checks
Assume that programs cannot safely dereference null pointers, and that
no code or data element resides at address zero.
This option enables simple constant
folding optimizations at all optimization levels.  In addition, other
optimization passes in GCC use this flag to control global dataflow
analyses that eliminate useless checks for null pointers; these assume
that a memory access to address zero always results in a trap, so
that if a pointer is checked after it has already been dereferenced,
it cannot be null.

Note however that in some environments this assumption is not true.
Use @option{-fno-delete-null-pointer-checks} to disable this optimization
for programs that depend on that behavior.

This option is enabled by default on most targets.  On Nios II ELF, it
defaults to off.  On AVR, CR16, and MSP430, this option is completely disabled.

Passes that use the dataflow information
are enabled independently at different optimization levels.


it might be possible to enhance this, but there seem to be multiple spots
in the compiler that would need adjusting.

[Bug tree-optimization/100404] Unable to disable removal of null pointer checks for nonnull function arguments

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100404

--- Comment #2 from Richard Biener  ---
There is -fno-delete-null-pointer-checks

[Bug target/100402] Crash in longjmp

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100402

--- Comment #4 from Richard Biener  ---
Works on x86_64-linux.

[Bug tree-optimization/100398] [12 Regression] ICE in gimple_redirect_edge_and_branch, at tree-cfg.c:6082

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100398

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |12.0
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org

[Bug tree-optimization/100398] [12 Regression] ICE in gimple_redirect_edge_and_branch, at tree-cfg.c:6082

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100398

Richard Biener  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2021-05-04
 Status|UNCONFIRMED |ASSIGNED

--- Comment #1 from Richard Biener  ---
Confirmed.  The asm goto is gone.  Mine (it's elided in DSE).

[Bug c++/100409] C++ FE elides pure throwing call

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409

Richard Biener  changed:

   What|Removed |Added

   Keywords||wrong-code

--- Comment #1 from Richard Biener  ---
Runtime testcase that aborts:

int x, y;
int __attribute__((pure,noinline)) foo () { if (x) throw 1; return y; }
int __attribute__((noinline)) foo2 () { foo (); return y; }

int __attribute__((noinline)) bar()
{
  int a[2];
  x = 1;
  try {
int res = foo2 ();
a[0] = res;
  } catch (...) {
  return 0;
  }
  return 1;
}

int main()
{
  if (bar ())
__builtin_abort ();
  return 0;
}

[Bug c++/100409] New: C++ FE elides pure throwing call

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409

Bug ID: 100409
   Summary: C++ FE elides pure throwing call
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

The C++ FE elides the call to foo() in

int x, y;
int __attribute__((pure,noinline)) foo () { if (x) throw 1; return y; }
void __attribute__((noinline)) foo2 () { foo (); }

despite it throwing an exception.  It does this in finish_expr_stmt
by calling convert_to_void on the following, likely relying on
!TREE_SIDE_EFFECTS

 
unit-size 
align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x765885e8 precision:32 min  max

pointer_to_this >

fn 
unsigned DI
size 
unit-size 
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x766e29d8>
constant
arg:0 
addressable used public static uninlinable decl_5 QI t2.c:2:36
align:8 warn_if_not_align:0 context 
attributes >
chain >>> initial  result 
full-name "int foo()"
struct-function 0x766de000 chain >>
t2.c:3:46 start: t2.c:3:42 finish: t2.c:3:47>

it happens here:

  if (expr != error_mark_node && !VOID_TYPE_P (TREE_TYPE (expr)))
{
...
  expr = build1 (CONVERT_EXPR, void_type_node, expr);
}
  if (! TREE_SIDE_EFFECTS (expr))
expr = void_node;
  return expr;

[Bug testsuite/100355] gcc.c-torture/execute/ieee/cdivchkld.c needs fmaxl

2021-05-04 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100355

--- Comment #3 from Uroš Bizjak  ---
(In reply to Christophe Lyon from comment #2)
> Tried that, but it's not taken into account.
> 
> ieee.exp uses c-torture-execute, maybe that function does not honor dg
> directives? (none of the tests under ieee/ has a dg- directive)

You will have to add cdivchkld.x with something like:

if [check_effective_target_c99_runtime] {
# Comment...
return 1
}

[Bug tree-optimization/91914] [9 Regression] Invalid strlen optimization

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

--- Comment #10 from rguenther at suse dot de  ---
On Tue, 4 May 2021, msebor at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91914
> 
> Martin Sebor  changed:
> 
>What|Removed |Added
> 
>  Resolution|--- |FIXED
>  Status|ASSIGNED|RESOLVED
> 
> --- Comment #9 from Martin Sebor  ---
> (In reply to Richard Biener from comment #7)
> > It's not clear to me which rev. fixed this for GCC 10, but we should
> > backport the fix to GCC 9 please.
> 
> It was fixed in r274837.  The change isn't completely isolated and affects
> warnings which is why I suggested the much more targeted fix in comment #2.  I
> committed it in r9-9501.

Thanks Martin

[Bug tree-optimization/100363] gcc generating wider load/store than warranted at -O3

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #17 from Richard Biener  ---
Not a bug.

[Bug target/100408] New: [nvptx][OpenMP] Enable SIMT for user-defined reduction

2021-05-04 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100408

Bug ID: 100408
   Summary: [nvptx][OpenMP] Enable SIMT for user-defined reduction
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Keywords: missed-optimization, openmp
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---
Target: nvptx-none

Follow-up to PR100321 - which is about the same issue but solved it by
disabling SIMT

>From the patch:

The test-case included in this patch contains this target region:
...
  for (int i0 = 0 ; i0 < N0 ; i0++ )
counter_N0.i += 1;
...

When running with nvptx accelerator, the counter variable is expected to
be N0 after the region, but instead is N0 / 32.  The problem is that rather
than getting the result for all warp lanes, we get it for just one lane.

This is caused by the implementation of SIMT being incomplete.  It handles
regular reductions, but appearantly not user-defined reductions.

For now, handle this by disabling SIMT in this case, specifically by
setting
sctx->max_vf to 1.

For details (code location, longer testcases, etc.) see PR100321

<    1   2   3   4