[Bug tree-optimization/111168] New: a[0,1]|b[0,-1] == 0 is not reduced to a ==0 & b ==0 if a and b are defined by comparisons

2023-08-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68 Bug ID: 68 Summary: a[0,1]|b[0,-1] == 0 is not reduced to a ==0 & b ==0 if a and b are defined by comparisons Product: gcc Version: 14.0 Status: UNCONFIRMED

Re: How can I run xg++ from its build location?

2023-08-26 Thread Michael Welsh Duggan via Gcc
David Edelsohn via Gcc writes: > n Fri, Aug 25, 2023 at 4:16 PM Michael Welsh Duggan via Gcc < > gcc@gcc.gnu.org> wrote: > >> I am attempting to debug an issue in gcc (PR 110827, if curious). In >> order to do this I have built a stage 1 compiler with debugging and >> without optimization as

Re: [PATCH v2] analyzer: Move gcc.dg/analyzer tests to c-c++-common (1) [PR96395]

2023-08-26 Thread David Malcolm via Gcc-patches
On Sat, 2023-08-26 at 14:22 +0200, priour...@gmail.com wrote: > From: benjamin priour > > Hi, > > Updated version of the patch, regstrapping the changes described in > https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628455.html. > > Regstrapped off trunk

gcc-13-20230826 is now available

2023-08-26 Thread GCC Administrator via Gcc
Snapshot gcc-13-20230826 is now available on https://gcc.gnu.org/pub/gcc/snapshots/13-20230826/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 13 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

[Bug target/111165] [13 regression] builtin strchr miscompiles on Debian/x32 with dietlibc

2023-08-26 Thread tg at mirbsd dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65 --- Comment #7 from Thorsten Glaser --- (but with this, I think it’s neither the GCC builtins, nor a change thereof, nor anything about dietlibc that is at fault; feel free to adjust the title accordingly) Surrounding code:

[Bug target/111165] [13 regression] builtin strchr miscompiles on Debian/x32 with dietlibc

2023-08-26 Thread tg at mirbsd dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65 --- Comment #6 from Thorsten Glaser --- dietlibc’s strlen is a horrid SSE nightmare that doesn’t call (f)emms, but it has a switch global variable __valgrind, if setting that to 1 it uses a very traditional loop instead, and the registers

[Bug target/111165] [13 regression] builtin strchr miscompiles on Debian/x32 with dietlibc

2023-08-26 Thread tg at mirbsd dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65 --- Comment #5 from Thorsten Glaser --- I managed to isolate one specific strchr call changing which causes the breakage to go away: asm volatile("nop"); //401 sp = cstrchr(sp, '\0') + 1; asm

[Bug fortran/110996] RISC-V vector Fortran: SEGV ICE during parsing

2023-08-26 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110996 Mikael Morin changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mikael at gcc dot gnu.org

[Bug target/111165] [13 regression] builtin strchr miscompiles on Debian/x32 with dietlibc

2023-08-26 Thread tg at mirbsd dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65 --- Comment #4 from Thorsten Glaser --- Its {,sig}{set,long}jmp for x32 look good.

[Bug tree-optimization/111167] swapping around duplicated conditionals can produce better code

2023-08-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67 --- Comment #1 from Andrew Pinski --- In this case the problem seems to be jump threading related. If we did: ``` void f(int); void lookup_attribute1(const char *attr_ns, int list, int t) { short t1; if (attr_ns) { if (list) {t1 = 0; goto

[Bug fortran/48776] ICE(segfault) after -std=f95 diagnostic error involving PROCEDURE

2023-08-26 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48776 Mikael Morin changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mikael at gcc dot gnu.org

[Bug tree-optimization/111167] swapping around duplicated conditionals can produce better code

2023-08-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug tree-optimization/111167] New: swapping around duplicated conditionals can produce better code

2023-08-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67 Bug ID: 67 Summary: swapping around duplicated conditionals can produce better code Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords:

[Bug target/111165] [13 regression] builtin strchr miscompiles on Debian/x32 with dietlibc

2023-08-26 Thread tg at mirbsd dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65 --- Comment #3 from Thorsten Glaser --- Not yet, given it’s been relatively clearly tracked down to a change in GCC. I’ll have at its setjmp/longjmp myself now, will report back.

[Bug fortran/48776] ICE(segfault) after -std=f95 diagnostic error involving PROCEDURE

2023-08-26 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48776 --- Comment #7 from Mikael Morin --- (In reply to Mikael Morin from comment #6) > Can't reproduce with a recent master (14.0.0 20230814). Sorry, missed the -std=f95 flag. Confirmed on recent master.

[Bug fortran/48776] ICE(segfault) after -std=f95 diagnostic error involving PROCEDURE

2023-08-26 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48776 Mikael Morin changed: What|Removed |Added CC||mikael at gcc dot gnu.org --- Comment #6

[Bug tree-optimization/111166] New: gcc unnecessarily creates vector operations for packing 32 bit integers into struct (x86_64)

2023-08-26 Thread gnu_bugzilla_gcc at catelyn dot tech via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66 Bug ID: 66 Summary: gcc unnecessarily creates vector operations for packing 32 bit integers into struct (x86_64) Product: gcc Version: 13.2.1 Status: UNCONFIRMED

[Bug target/111165] [13 regression] builtin strchr miscompiles on Debian/x32 with dietlibc

2023-08-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|

[Bug target/111165] [13 regression] builtin strchr miscompiles on Debian/x32 with dietlibc

2023-08-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65 --- Comment #1 from Andrew Pinski --- > (which makes me think of register corruption occurring here) >The codepath is a bit convoluted, setjmp/longjmp are involved. Which could mean it is a bug in dietlibc's setjmp/longjmp since you said it

[Bug target/111165] New: [13 regression] builtin strchr miscompiles on Debian/x32 with dietlibc

2023-08-26 Thread tg at mirbsd dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65 Bug ID: 65 Summary: [13 regression] builtin strchr miscompiles on Debian/x32 with dietlibc Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity:

[Bug fortran/86657] ASAN error: heap-use-after-free gcc/fortran/symbol.c:1762 in gfc_add_flavor

2023-08-26 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86657 Mikael Morin changed: What|Removed |Added CC||mikael at gcc dot gnu.org --- Comment #6

[Bug fortran/68152] ICE on declaring array result for function and entry

2023-08-26 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68152 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|NEW |WAITING Known to fail|

[Bug fortran/25095] Disallowed intrinsic in initialization statement

2023-08-26 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25095 anlauf at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P5 Severity|normal

[Bug rtl-optimization/111143] [missed optimization] unlikely code slows down diffutils x86-64 ASCII processing

2023-08-26 Thread eggert at cs dot ucla.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43 --- Comment #7 from Paul Eggert --- (In reply to Alexander Monakov from comment #6) > Are you binding the benchmark to some core in particular? I did the benchmark on performance cores, which was my original use case. On efficiency cores,

[C PATCH] c: flag for tag compatibility rules

2023-08-26 Thread Martin Uecker via Gcc-patches
Add a flag to turn tag compatibility rules on or off independent from the language version. gcc/c-family: * c.opt (flag_tag_compat): New flag. gcc/c: * c-decl.cc (diagnose_mismatched_decls, start_struct, finish_struct, start_enum, finish_enum): Support flag. *

[C PATCH 6/6] c23: construct composite type for tagged types

2023-08-26 Thread Martin Uecker via Gcc-patches
Support for constructing composite type for structs and unions in C23. gcc/c: * c-typeck.cc (composite_type_internal): Adapted from composite_type to support structs and unions. (composite_type): New wrapper function. (build_conditional_operator): Return

[C PATCH 5/6] c23: aliasing of compatible tagged types

2023-08-26 Thread Martin Uecker via Gcc-patches
Tell the backend which types are equivalent by setting TYPE_CANONICAL to one struct in the set of equivalent structs. Structs are considered equivalent by ignoring all sizes of arrays nested in types below field level. gcc/c: * c-decl.cc (c_struct_hasher): Hash stable for struct

[C PATCH 4/6] c23: tag compatibility rules for enums

2023-08-26 Thread Martin Uecker via Gcc-patches
Allow redefinition of enum types and enumerators. gcc/c: * c-decl.cc (start_num): Allow redefinition. (finish_enum): Diagnose conflicts. (build_enumerator): Set context. (diagnose_mismatched_decls): Diagnose conflicting enumerators. (push_decl): Preserve

[C PATCH 3/6] c23: tag compatibility rules for struct and unions

2023-08-26 Thread Martin Uecker via Gcc-patches
Implement redeclaration and compatibility rules for structures and unions in C23. gcc/c/: * c-decl.cc (previous_tag): New function. (get_parm_info): Turn off warning for C2X. (start_struct): Allow redefinitons. (finish_struct): Diagnose conflicts. *

[C PATCH 2/6] c23: recursive type checking of tagged type

2023-08-26 Thread Martin Uecker via Gcc-patches
Adapt the old and unused code for type checking for C23. gcc/c/: * c-typeck.c (struct comptypes_data): Add anon_field flag. (comptypes, comptypes_check_unum_int, comptypes_check_different_types): Remove old cache. (tagged_tu_types_compatible_p): Rewrite. ---

[C PATCH 1/6] c: reorganize recursive type checking

2023-08-26 Thread Martin Uecker via Gcc-patches
Reorganize recursive type checking to use a structure to store information collected during the recursion and returned to the caller (warning_needed, enum_and_init_p, different_types_p). gcc/c: * c-typeck.cc (struct comptypes_data): Add structure.

c23 type compatibility rules, v2

2023-08-26 Thread Martin Uecker via Gcc-patches
This is a revised series for the C23 rules for type compatibility. 1/6 c: reorganize recursive type checking 2/6 c23: recursive type checking of tagged type 3/6 c23: tag compatibility rules for struct and unions 4/6 c23: tag compatibility rules for enums 5/6 c23: aliasing of compatible tagged

[Bug libstdc++/111163] signed integer overflow in std::format("{:%S}",std::chrono::duration....)

2023-08-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63 --- Comment #3 from Jonathan Wakely --- We could also just have a "can_hh_mm_ss" check, as I think we use hh_mm_ss in most places where we do these conversations. Then we would just check once, not on every cast. I don't think we want to change

analyzer: Weekly update on extending C++ support (3)

2023-08-26 Thread Benjamin Priour via Gcc
Hi David, Sorry I missed out on your answer about the operator new patch on the IRC. Should I submit the first bit of the operator new patch ? Putting aside for now fixing the "uninitialized value" that accompanies "null deref" of nothrow new variants ? About generalizing tests to C++, I'll soon

[Patch, fortran] PR92586 - ICE in gimplify_expr, at gimplify.c:13479 with nested allocatable derived types

2023-08-26 Thread Paul Richard Thomas via Gcc-patches
Committed as 'obvious'. 13-branch to follow. commit r14-3501-g44bcb51eb0d5cac6eb2de54541ca8e6c2d738160 Author: Paul Thomas Date: Sat Aug 26 14:37:49 2023 +0100 Fortran: Supply a missing dereference [PR92586] 2023-08-26 Paul Thomas gcc/fortran PR fortran/92586

[Bug fortran/68152] ICE on declaring array result for function and entry

2023-08-26 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68152 Mikael Morin changed: What|Removed |Added CC||mikael at gcc dot gnu.org --- Comment #3

[Bug libstdc++/111163] signed integer overflow in std::format("{:%S}",std::chrono::duration....)

2023-08-26 Thread gcc at pauldreik dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63 --- Comment #2 from Paul Dreik --- The fmt lib had the same problem. I wrote a safe duration cast which eventually morphed into this: https://github.com/fmtlib/fmt/blob/9b74160817f2bc63288d2111e823a35dd3dbf234/include/fmt/chrono.h#L57-L68

Re: How can I run xg++ from its build location?

2023-08-26 Thread Benjamin Priour via Gcc
Hi, If you further have issues with loading required libraries, you could try running a test intended for g++ (make check-c++ from under BUILDDIR/gcc/) You may find examples at https://gcc-newbies-guide.readthedocs.io/en/latest/working-with-the-testsuite.html#running-just-one-test-or-just-a-few

[Bug libstdc++/111163] signed integer overflow in std::format("{:%S}",std::chrono::duration....)

2023-08-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63 --- Comment #1 from Jonathan Wakely --- This doesn't seem much different to: std::chrono::seconds s = std::chrono::duration{2314885530818453536}; Which we can't really do much about.

[Bug libstdc++/111163] signed integer overflow in std::format("{:%S}",std::chrono::duration....)

2023-08-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63 Jonathan Wakely changed: What|Removed |Added Target Milestone|--- |13.3 Status|UNCONFIRMED

[Bug libstdc++/111162] signed integer overflow triggered by std::chrono::parse

2023-08-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62 Jonathan Wakely changed: What|Removed |Added Ever confirmed|0 |1 Target Milestone|---

[Bug fortran/92586] ICE in gimplify_expr, at gimplify.c:13479 with nested allocatable derived types

2023-08-26 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92586 --- Comment #13 from CVS Commits --- The master branch has been updated by Paul Thomas : https://gcc.gnu.org/g:44bcb51eb0d5cac6eb2de54541ca8e6c2d738160 commit r14-3501-g44bcb51eb0d5cac6eb2de54541ca8e6c2d738160 Author: Paul Thomas Date: Sat

[PATCH v2] Mode-Switching: Add optional EMIT_AFTER hook

2023-08-26 Thread Pan Li via Gcc-patches
From: Pan Li Update in v2: * Remove control flow check in BB_END. * Passed x86 bootstrap and regression test. Original log: We have EMIT hook in mode switching already, which will insert the insn before in most cases. However, in some arch like RISC-V, it requires the additional insn to be

[Bug c++/111164] New: The error message for a literal operator accepting an argument of the wrong type is confusing

2023-08-26 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64 Bug ID: 64 Summary: The error message for a literal operator accepting an argument of the wrong type is confusing Product: gcc Version: 14.0 Status: UNCONFIRMED

[Bug libstdc++/111163] New: signed integer overflow in std::format("{:%S}",std::chrono::duration....)

2023-08-26 Thread gcc at pauldreik dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63 Bug ID: 63 Summary: signed integer overflow in std::format("{:%S}",std::chrono::duration) Product: gcc Version: 14.0 Status: UNCONFIRMED Severity:

[Bug fortran/92586] ICE in gimplify_expr, at gimplify.c:13479 with nested allocatable derived types

2023-08-26 Thread pault at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92586 Paul Thomas changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |pault at gcc dot gnu.org ---

[Bug libstdc++/111162] New: signed integer overflow triggered by std::chrono::parse

2023-08-26 Thread gcc at pauldreik dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62 Bug ID: 62 Summary: signed integer overflow triggered by std::chrono::parse Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal

[Bug ipa/111157] [14 Regression] 416.gamess fails with a run-time abort when compiled with -O2 -flto after r14-3226-gd073e2d75d9ed4

2023-08-26 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57 --- Comment #4 from Jan Hubicka --- So here ipa-modref declares the field dead, while ipa-prop determines its value even if it is unused and makes it used later? I think dead argument is probably better than optimizing out one store, so I

[PATCH] libcpp: Small incremental patch for P1854R4 [PR110341]

2023-08-26 Thread Jakub Jelinek via Gcc-patches
Hi! The following incremental patch to the PR110341 posted patch uses a special conversion callback instead of conversion from host charset (UTF-8/UTF-EBCDIC) to UTF-32, and also ignores all diagnostics from the second cpp_interpret_string which should just count chars. The UTF-EBCDIC is

[Bug c++/85097] ICE in double parameter pack

2023-08-26 Thread michal.staromiejski+gnu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85097 --- Comment #5 from Michał Staromiejski --- In clang 16.0.0 it compiles w/o errors.

[Bug c++/85097] ICE in double parameter pack

2023-08-26 Thread michal.staromiejski+gnu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85097 Michał Staromiejski changed: What|Removed |Added CC||michal.staromiejski+gnu@gma

[Bug target/111161] New: [13 Regression] ICE: RTL check: expected code 'const_int', have 'reg' in riscv_print_operand, at config/riscv/riscv.cc:4394 during build

2023-08-26 Thread zsojka at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61 Bug ID: 61 Summary: [13 Regression] ICE: RTL check: expected code 'const_int', have 'reg' in riscv_print_operand, at config/riscv/riscv.cc:4394 during build Product:

Re: [PATCH] rs6000: Fix issue in specifying PTImode as an attribute [PR106895]

2023-08-26 Thread Michael Meissner via Gcc-patches
On Thu, Aug 24, 2023 at 09:19:51PM -0500, Peter Bergner wrote: > On 8/24/23 12:35 PM, Michael Meissner wrote: > > On Thu, Jul 20, 2023 at 10:05:28AM +0530, jeevitha wrote: > >> gcc/ > >>PR target/110411 > >>* config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add fields > >>to

[Bug rtl-optimization/111143] [missed optimization] unlikely code slows down diffutils x86-64 ASCII processing

2023-08-26 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43 --- Comment #6 from Alexander Monakov --- Thanks. i5-1335U has two "performance cores" (with HT, four logical CPUs) and eight "efficiency cores". They have different micro-architecture. Are you binding the benchmark to some core in particular?

[Bug tree-optimization/102793] AArch64: sequential comparisons with equal conditional blocks don't use ccmp

2023-08-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102793 --- Comment #5 from Andrew Pinski --- (In reply to Andrew Pinski from comment #4) > basically ccmp expension is just ifcombine really. > That is: > cc = bar cmp 0 > cc = cc.eq ? ne : d1 cmp d2 > cset cc.ne > So this is why doing a late pass

[Bug tree-optimization/110891] [14 Regression] Dead Code Elimination Regression since r14-2674-gd0de3bf9175

2023-08-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110891 Andrew Pinski changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug tree-optimization/110891] [14 Regression] Dead Code Elimination Regression since r14-2674-gd0de3bf9175

2023-08-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110891 Andrew Pinski changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org ---