[Bug c/113518] ICE: in gimplify_expr, at gimplify.cc:18596 with atomic_fetch_or_explicit() on _BitInt()

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113518

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
  Component|tree-optimization   |c
   Last reconfirmed||2024-01-20
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
Confirmed.

There is a leaking c_maybe_const_expr from the front-end to the gimplifier.

[Bug target/113458] Missed SLP for reduction of multiplication/addition with promotion

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113458

--- Comment #10 from Andrew Pinski  ---
I will note that LLVM does not try to do V2HI (or rather their equivalent
there), maybe the cost is too high for most cores ...

[Bug target/113510] [14 Regression ARM Thumb] ICE in extract_constrain_insn with CPU cortex-m23

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113510

Andrew Pinski  changed:

   What|Removed |Added

  Component|rtl-optimization|target
   Target Milestone|--- |14.0
   Keywords||ice-on-valid-code, ra

--- Comment #3 from Andrew Pinski  ---
g:a729b6e002fe

[Bug c/113492] [14 Regression] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

--- Comment #4 from uecker at gcc dot gnu.org ---

Yes, it is just weird because similar bugs for other new language features,
e.g. an ICE for BitInt are not labeled as a regression and are P3.

[Bug c/113492] [14 Regression] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code

--- Comment #5 from Andrew Pinski  ---
(In reply to uecker from comment #4)
> Yes, it is just weird because similar bugs for other new language features,
> e.g. an ICE for BitInt are not labeled as a regression and are P3.

-std=c2x is not a "new feature" in GCC 14 though, it was there in GCC 13. What
is a new feature is "constructing composite types for structs and unions" but
those rules might not be known by many users so it is only new feature
internally.

Also P3 just means not categorized yet; I forgot where that is documented.

[Bug target/113507] can't build a cross compiler to rs6000-ibm-aix7.2

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113507

--- Comment #1 from Andrew Pinski  ---
This seems like a depedency issue.

rs6000_builtin_types is defined in rs6000-builtins.cc which gets built by
build/rs6000-gen-builtins which is built from
$(srcdir)/config/rs6000/rs6000-gen-builtins.cc .

[Bug c/113492] [14 Regression] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

--- Comment #6 from uecker at gcc dot gnu.org ---

The point is that no existing code is broken by this because it was rejected
previously and now this only affects very new C23 code using bit-fields in
different structs that a declared in different ways and then only when using
together -funsigned-bitfields. So it is an obscure corner case of an obscure
corner case... 

But I will fix it anyway, soon I was just wondering why many similar bugs have
a different rating... If this is just because nobody came around to categorize
it, this makes sense.

[Bug ada/113350] class-wide renaming primitive

2024-01-20 Thread p.p11 at orange dot fr via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113350

Pascal Pignard  changed:

   What|Removed |Added

  Attachment #57049|0   |1
is obsolete||

--- Comment #2 from Pascal Pignard  ---
Created attachment 57172
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57172&action=edit
Reproducer version 2.

Actually, the special -gnatX is needed.
I was experimenting some new features from AdaCore.
Any way, nothing related with the issue, thus, I post a version 2:

% gnatmake test_20240110_renproc_2.adb 
gcc -c test_20240110_renproc_2.adb
gnatbind -x test_20240110_renproc_2.ali
gnatlink test_20240110_renproc_2.ali

% ./test_20240110_renproc_2 
Hei
Full Hei

[Bug fortran/113503] [14 Regression] xtb test miscompilation starting with r14-870

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113503

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2024-01-20

--- Comment #3 from Andrew Pinski  ---
.

[Bug ada/113351] error on primitive renaming: too many arguments in call

2024-01-20 Thread p.p11 at orange dot fr via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113351

Pascal Pignard  changed:

   What|Removed |Added

  Attachment #57050|0   |1
is obsolete||

--- Comment #2 from Pascal Pignard  ---
Created attachment 57173
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57173&action=edit
Reproducer version 2.

Actually, the special -gnatX is needed.
I was experimenting some new features from AdaCore.
Any way, nothing related with the issue, thus, I post a version 2:
(Note: one change from reproducer of Bug 113350 -> uncomment line 36.)

% gnatmake test_20240110_renproc_2.adb
gcc -c test_20240110_renproc_2.adb
test_20240110_renproc_2.adb:36:14: error: too many arguments in call to "log"

[Bug debug/112878] ICE: in ctf_add_slice, at ctfc.cc:499 with -std=c23 -gctf1

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112878

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-01-20

--- Comment #2 from Andrew Pinski  ---
Confirmed.

The assert is obvious hitting because the bit_size is greater than 255:


  gcc_assert ((bit_size <= 255) && (bit_offset <= 255));

[Bug tree-optimization/113521] New: ICE when building swi-prolog-9.1.2 with LTO in verify_gimple_in_cfg

2024-01-20 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113521

Bug ID: 113521
   Summary: ICE when building swi-prolog-9.1.2 with LTO in
verify_gimple_in_cfg
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: arsen at gcc dot gnu.org
  Target Milestone: ---

Trying again - PR113520 was my first reduction for this but ended up being a
different problem.

ICE when building swi-prolog-9.1.2 with LTO.

object.c.i:
```
extern int builtin_names[];
void vm_send();
void freeObject() { vm_send(0, &builtin_names[6]); }
```

passing.c.i:
```
typedef void *Any;
int *vm_send_g_0;
void assignField();
void pceExecuteGoal() { assignField(); }
void vm_send(Any, int *selector, Any) { vm_send_g_0 = selector; }
```

self.c.i:
```
struct {
} builtin_names[];
__attribute__((visibility("hidden"))) void vm_send() {}
```

```
$ gcc -O2 -flto object.c.i passing.c.i self.c.i -shared
self.c.i:2:3: warning: array ‘builtin_names’ assumed to have one element
2 | } builtin_names[];
  |   ^
/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld:
/tmp/ccvOAHi5.o (symbol from plugin): in function `vm_send':
(.text+0x0): multiple definition of `vm_send'; /tmp/ccy7z8Z5.o (symbol from
plugin):(.text+0x0): first defined here
object.c.i:1:12: warning: type of ‘builtin_names’ does not match original
declaration [-Wlto-type-mismatch]
1 | extern int builtin_names[];
  |^
self.c.i:2:3: note: ‘builtin_names’ was previously declared here
2 | } builtin_names[];
  |   ^
self.c.i:2:3: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is
used
object.c.i: In function ‘freeObject’:
object.c.i:3:6: error: type mismatch in ‘array_ref’
3 | void freeObject() { vm_send(0, &builtin_names[6]); }
  |  ^
int

struct
{
}

# .MEM_3 = VDEF <.MEM_1(D)>
vm_send_g_0 = &builtin_names[6];
during GIMPLE pass: fixup_cfg
object.c.i:3:6: internal compiler error: verify_gimple failed
0x562dba6085f4 verify_gimple_in_cfg(function*, bool, bool)
   
/usr/src/debug/sys-devel/gcc-14.0.1./gcc-14.0.1./gcc/tree-cfg.cc:5666
0x562dbbb1058c execute_function_todo
   
/usr/src/debug/sys-devel/gcc-14.0.1./gcc-14.0.1./gcc/passes.cc:2088
0x562dbbb1058c do_per_function
   
/usr/src/debug/sys-devel/gcc-14.0.1./gcc-14.0.1./gcc/passes.cc:1687
0x562dbbb1058c execute_todo
   
/usr/src/debug/sys-devel/gcc-14.0.1./gcc-14.0.1./gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld:
error: lto-wrapper failed
collect2: error: ld returned 1 exit status
```

[Bug tree-optimization/113521] ICE when building swi-prolog-9.1.2 with LTO in verify_gimple_in_cfg

2024-01-20 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113521

--- Comment #1 from Sam James  ---
The original unreduced bt was:
```
/var/tmp/portage/dev-lang/swi-prolog-9.1.2-r1/work/swipl-9.1.2/packages/xpce/src/h/kernel.h:1443:20:
warning: type of ‘builtin_names’ does not match original declaration
[-Wlto-type-mismatch]
 1443 | extern struct name builtin_names[]; /* object-array of built-in's
*/
  |^
/var/tmp/portage/dev-lang/swi-prolog-9.1.2-r1/work/swipl-9.1.2/packages/xpce/src/ker/name.c:58:14:
note: type ‘struct bname’ should match type ‘struct name’
   58 | struct bname builtin_names[] =
  |  ^
/var/tmp/portage/dev-lang/swi-prolog-9.1.2-r1/work/swipl-9.1.2/packages/xpce/src/ker/name.c:58:14:
note: ‘builtin_names’ was previously declared here
/var/tmp/portage/dev-lang/swi-prolog-9.1.2-r1/work/swipl-9.1.2/packages/xpce/src/ker/name.c:58:14:
note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
lto-wrapper: warning: using serial compilation of 28 LTRANS jobs
lto-wrapper: note: see the ‘-flto’ option documentation for more information
/var/tmp/portage/dev-lang/swi-prolog-9.1.2-r1/work/swipl-9.1.2/packages/xpce/src/gra/device.c:
In function ‘layoutDialogDevice’:
/var/tmp/portage/dev-lang/swi-prolog-9.1.2-r1/work/swipl-9.1.2/packages/xpce/src/gra/device.c:1526:1:
error: type mismatch in ‘array_ref’
 1526 | layoutDialogDevice(Device d, Size gap, Size bb, Size border)
  | ^
struct name

struct bname

# .MEM_1457 = VDEF <.MEM_1425>
ht_1093->refer = &builtin_names[1542];
during GIMPLE pass: fixup_cfg
/var/tmp/portage/dev-lang/swi-prolog-9.1.2-r1/work/swipl-9.1.2/packages/xpce/src/gra/device.c:1526:1:
internal compiler error: verify_gimple failed
0x55597c3245f4 verify_gimple_in_cfg(function*, bool, bool)
[...]
```

[Bug c/113492] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread zsojka at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

Zdenek Sojka  changed:

   What|Removed |Added

Summary|[14 Regression] ICE: in |ICE: in
   |composite_type_internal, at |composite_type_internal, at
   |c/c-typeck.cc:557 with  |c/c-typeck.cc:557 with
   |-std=c2x|-std=c2x
   |-funsigned-bitfields since  |-funsigned-bitfields since
   |r14-6808|r14-6808

--- Comment #7 from Zdenek Sojka  ---
I am sorry for any confusion. I was not aware of the change between gcc-13 and
gcc-14 that this code should be accepted now.

[Bug c/113492] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

--- Comment #8 from Andrew Pinski  ---
Note it is an user visible regression. We have had this kind of discussion
before when we go from rejects to ICE without an error. I know I can dig up
some discussions about that.

[Bug lto/113521] ICE when building swi-prolog-9.1.2 with LTO in verify_gimple_in_cfg

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113521

--- Comment #2 from Andrew Pinski  ---
Note this code is definitely undefined . We should not be ICEing on it though.

[Bug c/113492] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

--- Comment #9 from uecker at gcc dot gnu.org ---
No need to dig it up, I believe you. I was just wondering.

[Bug libstdc++/113522] New: std::swap cannot be called with explicit template argument std::array

2024-01-20 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113522

Bug ID: 113522
   Summary: std::swap cannot be called with explicit template
argument std::array
   Product: gcc
   Version: 13.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

This program

#include 
#include 

int main() {
std::array a, b;
std::swap< std::array >( a, b ); 
}

is accepted by MSVC and Clang with libc++, but GCC with libstdc++ complains:

error: no matching function for call to 'swap
>(std::array&, std::array&)'

Online demo: https://godbolt.org/z/8xnd5PsfE

Related discussion: https://stackoverflow.com/q/77844837/7325599

[Bug libstdc++/113522] std::swap cannot be called with explicit template argument std::array

2024-01-20 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113522

--- Comment #1 from Jonathan Wakely  ---
This is silly code and there is no reason to support it.

[Bug ada/113350] class-wide renaming primitive

2024-01-20 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113350

Eric Botcazou  changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #3 from Eric Botcazou  ---
Thanks for the adjustment.  Very peculiar issue in any case.

[Bug ada/113351] error on primitive renaming: too many arguments in call

2024-01-20 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113351

Eric Botcazou  changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #3 from Eric Botcazou  ---
Thanks for the adjustment.  Another very peculiar issue.

[Bug libstdc++/113522] std::swap cannot be called with explicit template argument std::array

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113522

--- Comment #2 from Andrew Pinski  ---
It was added in r7-5068-ga2863bde755d39 for LWG 2766 .

[Bug libstdc++/113522] std::swap cannot be called with explicit template argument std::array

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113522

--- Comment #3 from Andrew Pinski  ---
https://timsong-cpp.github.io/lwg-issues/2766

The LWG issue is still open ...

[Bug testsuite/106680] Test gcc.target/powerpc/bswap64-4.c fails on 32-bit BE

2024-01-20 Thread sebastian.huber--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106680

Sebastian Huber  changed:

   What|Removed |Added

 CC||sebastian.huber@embedded-br
   ||ains.de

--- Comment #5 from Sebastian Huber  ---
Created attachment 57174
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57174&action=edit
Proprocessed test file.

[Bug testsuite/106680] Test gcc.target/powerpc/bswap64-4.c fails on 32-bit BE

2024-01-20 Thread sebastian.huber--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106680

--- Comment #6 from Sebastian Huber  ---
It seems that the change

commit acc727cf02a1446dc00f8772f3f479fa3a508f8e
Author: Kewen Lin 
Date:   Tue Dec 27 04:13:07 2022 -0600

rs6000: Rework option -mpowerpc64 handling [PR106680]

causes a regression for -mcpu=e6500 -m32, for example:

gcc -fpreprocessed -O2 -S -mcpu=e6500 -m32 -S imfs_add_node.c.67.s
imfs_add_node.c.67.i

diff -u imfs_add_node.c.67.s.good.e2acff49fb2962b921bf8b73984b89878b61492c
imfs_add_node.c.67.s.bad.acc727cf02a1446dc00f8772f3f479fa3a508f8e
--- imfs_add_node.c.67.s.good.e2acff49fb2962b921bf8b73984b89878b61492c 
2024-01-20 12:15:15.143182571 +0100
+++ imfs_add_node.c.67.s.bad.acc727cf02a1446dc00f8772f3f479fa3a508f8e  
2024-01-20 12:11:46.804204927 +0100
@@ -52,8 +52,8 @@
bne- 0,.L4
 .L2:
mr 4,29
-   addi 3,1,8
li 5,24
+   addi 3,1,8
bl rtems_filesystem_eval_path_start
lis 9,IMFS_node_clone@ha
lwz 10,20(3)
@@ -63,12 +63,12 @@
cmpw 0,10,9
beq- 0,.L24
li 4,134
-   addi 3,1,8
+   li 3,0
bl rtems_filesystem_eval_path_error
 .L9:
li 31,-1
 .L10:
-   addi 3,1,8
+   li 3,0
bl rtems_filesystem_eval_path_cleanup
 .L1:
lwz 0,116(1)
@@ -93,7 +93,7 @@
lwz 9,12(31)
li 8,96
lhz 10,16(31)
-   addi 3,1,8
+   li 3,0
stw 8,24(1)
stw 9,8(1)
stw 10,12(1)
@@ -105,7 +105,7 @@
cmpwi 0,9,0
beq- 0,.L9
li 4,22
-   addi 3,1,8
+   li 3,0
bl rtems_filesystem_eval_path_error
b .L9
.p2align 4,,15
@@ -129,12 +129,9 @@
stw 9,0(10)
stw 10,4(9)
bl _Timecounter_Getbintime
-   lwz 10,64(1)
-   lwz 11,68(1)
-   stw 10,40(30)
-   stw 11,44(30)
-   stw 10,48(30)
-   stw 11,52(30)
+   ld 9,64(1)
+   std 9,40(30)
+   std 9,48(30)
b .L10
.cfi_endproc
 .LFE351:

For the call to rtems_filesystem_eval_path_cleanup() the register 3 should
point to a structure on the stack. Correct is:

-   addi 3,1,8

Wrong is:

+   li 3,0

It seems that for the -mcpu=e6500 the -m32 option has not the right effect and
some 64-bit instructions are generated, for example ld and std plus the wrong
function parameters.

[Bug tree-optimization/113491] ICE: SIGSEGV in make_ssa_name_fn (tree-ssanames.cc:354) at -Os with _BitInt() used as switch control expression

2024-01-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113491

--- Comment #3 from GCC Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:291e00e2d88a352f46cd539e3c5785982dc3fdd9

commit r14-8302-g291e00e2d88a352f46cd539e3c5785982dc3fdd9
Author: Jakub Jelinek 
Date:   Sat Jan 20 12:35:38 2024 +0100

tree-switch-conversion: Bugfixes for _BitInt [PR113491]

The following patch fixes various issues with large/huge _BitInt used as
switch
expressions.
In particular:
1) the indexes in CONSTRUCTORs shouldn't be types with precision larger
than
   sizetype precision, varasm uses wi::to_offset on those and too large
   indexes ICE; we've already checked earlier that the cluster is at most
   sizetype bits and arrays can't be larger than that anyway
2) some spots were using SCALAR_INT_TYPE_MODE or
   lang_hooks.types.type_for_mode on TYPE_MODE to determine types to use,
   that obviously doesn't work for the large/huge BITINT_TYPE
3) like the recent change in the C FE, this patch makes sure we don't
create
   ARRAY_REFs with indexes with precision above sizetype precision, because
   bitint lowering isn't prepared for that and because the indexes can't be
   larger than sizetype anyway; the subtraction of the cluster minimum from
   the index obviously needs to be done in unsigned __int128 or large/huge
   BITINT_TYPE, but then we cast to sizetype if the precision is larger
than
   sizetype

2024-01-20  Jakub Jelinek  

PR tree-optimization/113491
* tree-switch-conversion.cc
(switch_conversion::build_constructors):
If elt.index has precision higher than sizetype, fold_convert it to
sizetype.
(switch_conversion::array_value_type): Return type if type is
BITINT_TYPE with precision above MAX_FIXED_MODE_SIZE or with
BLKmode.
(switch_conversion::build_arrays): Use unsigned_type_for rather
than
lang_hooks.types.type_for_mode if utype is BITINT_TYPE with
precision
above MAX_FIXED_MODE_SIZE or with BLKmode.  If utype has precision
higher than sizetype, use sizetype as tidx type and fold_convert
the
subtraction to sizetype.

* gcc.dg/torture/bitint-51.c: New test.

[Bug tree-optimization/113462] ICE: in handle_cast, at gimple-lower-bitint.cc:1539 at -O with _BitInt() in a struct

2024-01-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113462

--- Comment #3 from GCC Commits  ---
The master branch has been updated by Jakub Jelinek :

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

commit r14-8303-gefc677f3e78abf02264e4a64c751b4ecdc918ec9
Author: Jakub Jelinek 
Date:   Sat Jan 20 12:36:32 2024 +0100

lower-bitint: Handle INTEGER_CST rhs1 in handle_cast [PR113462]

The following patch ICEs because fre3 leaves around unfolded
  _1 = VIEW_CONVERT_EXPR<_BitInt(129)>(0);
statement and in handle_cast I was expecting just SSA_NAMEs for the
large/huge _BitInt to large/huge _BitInt casts; INTEGER_CST is something
we can handle in that case exactly the same, as the handle_operand
recursion
handles those.

Of course, maybe we should also try to fold_stmt such cases somewhere in
bitint lowering preparation.

2024-01-20  Jakub Jelinek  

PR tree-optimization/113462
* gimple-lower-bitint.cc (bitint_large_huge::handle_cast):
Handle rhs1 INTEGER_CST like SSA_NAME.

* gcc.dg/bitint-76.c: New test.

[Bug tree-optimization/113462] ICE: in handle_cast, at gimple-lower-bitint.cc:1539 at -O with _BitInt() in a struct

2024-01-20 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113462

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #4 from Jakub Jelinek  ---
Fixed.

[Bug tree-optimization/113491] ICE: SIGSEGV in make_ssa_name_fn (tree-ssanames.cc:354) at -Os with _BitInt() used as switch control expression

2024-01-20 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113491

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #4 from Jakub Jelinek  ---
Fixed.

[Bug c++/113523] New: A conversion function template can have a deduced return type

2024-01-20 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113523

Bug ID: 113523
   Summary: A conversion function template can have a deduced
return type
   Product: gcc
   Version: 13.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

Contrary to https://timsong-cpp.github.io/cppwp/n4861/class.conv.fct#6, GCC
allows  a conversion function template with a deduced return type:


struct A {
template
constexpr operator auto() const { return 1; }
};

constexpr int f() {
return A{}.template operator auto();
}

static_assert( f() == 1 );


Online demo: https://godbolt.org/z/s8oK6rnPY

In addition, the diagnostics "warning: use of 'auto' in member template
conversion operator can never be deduced" seems wrong.

[Bug c/113492] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

--- Comment #10 from uecker at gcc dot gnu.org ---
Removing the assertion is enough to fix it. But the cause is strange. We
somehow get two unsigned types in DECL_BIT_FIELD_TYPE which should be the same
but are not, e.g:

  constant 32>
unit-size  constant 4>
align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f6dad774738 precision:32 min  max >
  constant 32>
unit-size  constant 4>
align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f6dad622690 precision:32 min  max 
pointer_to_this >

[Bug libgomp/113513] [OpenMP] libgomp: cuCtxGetDevice error with OMP_DISPLAY_ENV=true OMP_TARGET_OFFLOAD="mandatory" for libgomp.c/target-52.c

2024-01-20 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113513

--- Comment #1 from Tobias Burnus  ---
Looking at the called GOMP_OFFLOAD_* function, in the failing case, there is:

...
DEBUG GOMP_OFFLOAD_run
DEBUG GOMP_OFFLOAD_dev2host
DEBUG GOMP_OFFLOAD_free
DEBUG: nvptx_attach_host_thread_to_device - 0

and in the successful case:

DEBUG GOMP_OFFLOAD_fini_device 0  <<< called before unregister
DEBUG: GOMP_offload_unregister_ver dev=0; state=GOMP_DEVICE_FINALIZED
DEBUG: GOMP_offload_unregister_ver dev=0; state=GOMP_DEVICE_FINALIZED

and then - in the failing case:

DEBUG: GOMP_offload_unregister_ver dev=0; state=GOMP_DEVICE_INITIALIZED
DEBUG: GOMP_offload_unregister_ver dev=0; state=GOMP_DEVICE_INITIALIZED
DEBUG: gomp_unload_image_from_device
DEBUG GOMP_OFFLOAD_unload_image, 0, 196609
DEBUG: gomp_target_fini; dev=0, state=GOMP_DEVICE_INITIALIZED
DEBUG GOMP_OFFLOAD_fini_device 0
DEBUG: nvptx_attach_host_thread_to_device - 0
libgomp: cuCtxGetDevice error: unknown cuda error


Thus, for some reason, GOMP_OFFLOAD_fini_device then
GOMP_offload_unregister_ver is swapped when
  OMP_DISPLAY_ENV=true and OMP_TARGET_OFFLOAD="mandatory"
are set - but not otherwise.


The call to omp_target_fini comes from:

  if (atexit (gomp_target_fini) != 0)
gomp_fatal ("atexit failed");


While the call to   GOMP_offload_unregister_ver  comes from mkoffload:

  fprintf (out, "static __attribute__((destructor)) void fini (void)\n"
   "{\n"
   "  GOMP_offload_unregister_ver (%#x, __OFFLOAD_TABLE__,"
   " %d/*NVIDIA_PTX*/, &nvptx_data);\n"
   "};\n",


 * * * 


Actually, the same problem occurs when compiled with:

  -foffload=disable

With that flag + no 'mandatory':

DEBUG GOMP_OFFLOAD_version
DEBUG GOMP_OFFLOAD_get_caps
DEBUG GOMP_OFFLOAD_get_num_devices 0
DEBUG GOMP_OFFLOAD_get_name
DEBUG GOMP_OFFLOAD_get_type
DEBUG GOMP_OFFLOAD_init_device 0
DEBUG: nvptx_open_device - 0
DEBUG: gomp_target_fini; dev=0, state=GOMP_DEVICE_INITIALIZED
DEBUG GOMP_OFFLOAD_fini_device 0
DEBUG: nvptx_attach_host_thread_to_device - 0


And with 'mandatory' + OMP_DISPLAY_ENV=verbose:

DEBUG GOMP_OFFLOAD_version
DEBUG GOMP_OFFLOAD_get_caps
DEBUG GOMP_OFFLOAD_get_num_devices 0
DEBUG GOMP_OFFLOAD_get_name
DEBUG GOMP_OFFLOAD_get_type
< omp_display_env output>
DEBUG GOMP_OFFLOAD_init_device 0
DEBUG: nvptx_open_device - 0

libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device cannot be used for
offloading
DEBUG: gomp_target_fini; dev=0, state=GOMP_DEVICE_INITIALIZED
DEBUG GOMP_OFFLOAD_fini_device 0
DEBUG: nvptx_attach_host_thread_to_device - 

libgomp: cuCtxGetDevice error: unknown cuda error

libgomp: device finalization failed


Thus, the error message is the same – but here no offloading code exists and
just gomp_target_fini is called. - However, there is a prior call to 
'gomp_fatal'  which probably messes things up for the plugin handling - while
in the original code, we have a valid code.

 * * *

If there is no offloading code but
  OMP_DISPLAY_ENV=verbose OMP_TARGET_OFFLOAD="mandatory"
is used, it works:

DEBUG GOMP_OFFLOAD_version
DEBUG GOMP_OFFLOAD_get_caps
DEBUG GOMP_OFFLOAD_get_num_devices 0
DEBUG GOMP_OFFLOAD_get_name
DEBUG GOMP_OFFLOAD_get_type

OPENMP DISPLAY ENVIRONMENT BEGIN
 ...
OPENMP DISPLAY ENVIRONMENT END
DEBUG: gomp_target_fini; dev=0, state=0

 * * *

If there is only one or none of the two env vars, there is no need to search
for devices - and, hence, the nvptx plugin is not called at all and it,
obviously, works as well.

[Bug c/102998] Wrong documentation for -Warray-parameter

2024-01-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102998

--- Comment #5 from GCC Commits  ---
The master branch has been updated by Sandra Loosemore :

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

commit r14-8304-g8fd992a3dfa8c3e00d4a41846de2061ff6c5652a
Author: Sandra Loosemore 
Date:   Sat Jan 20 14:30:17 2024 +

Correct documentation for -Warray-parameter [PR102998]

gcc/ChangeLog
PR c/102998
* doc/invoke.texi (Option Summary): Add -Warray-parameter.
(Warning Options): Correct/edit discussion of -Warray-parameter
to make the first example less confusing, and fill in missing info.

[Bug c/113492] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

--- Comment #11 from uecker at gcc dot gnu.org ---
Created attachment 57175
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57175&action=edit
patch


Untested patch.

[Bug c/113438] ICE (segfault) in dwarf2out_decl with -g -std=c23 on c23-tag-composite-2.c

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113438

uecker at gcc dot gnu.org changed:

   What|Removed |Added

 Target|aarch64-*-* |

--- Comment #3 from uecker at gcc dot gnu.org ---
Not aarch64 specific.

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

2024-01-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48776

--- Comment #12 from GCC Commits  ---
The master branch has been updated by Mikael Morin :

https://gcc.gnu.org/g:6930e1f1055c39bea170c25f694f7301989e5d1d

commit r14-8305-g6930e1f1055c39bea170c25f694f7301989e5d1d
Author: Mikael Morin 
Date:   Fri Jan 19 18:47:36 2024 +0100

fortran: Restore current interface info on error [PR111291]

This change is a followup to the fix for PR48776 (namely
r14-3572-gd58150452976c4ca65ddc811fac78ef956fa96b0 AKA
fortran: Restore interface to its previous state on error [PR48776]),
which cleaned up new changes from interfaces upon error.

Unfortunately, there is one case in that fix that is mishandled, visible
on unexpected_interface.f90 with valgrind or an asan-instrumented gfortran.
when an interface statement is found while parsing an interface body (which
is invalid), the current interface is replaced by the one from the new
statement, and as parsing continues, new procedures are added
to the new interface, which has been rejected and freed, instead of the
original one.

This change restores the current interface pointer to its previous value
on each rejected statement.

PR fortran/48776
PR fortran/111291

gcc/fortran/ChangeLog:

* parse.cc: Restore current interface to its previous value on
error.

[Bug fortran/111291] ASAN error: heap-use-after-free gcc/fortran/parse.cc:359 in decode_statement

2024-01-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111291

--- Comment #5 from GCC Commits  ---
The master branch has been updated by Mikael Morin :

https://gcc.gnu.org/g:6930e1f1055c39bea170c25f694f7301989e5d1d

commit r14-8305-g6930e1f1055c39bea170c25f694f7301989e5d1d
Author: Mikael Morin 
Date:   Fri Jan 19 18:47:36 2024 +0100

fortran: Restore current interface info on error [PR111291]

This change is a followup to the fix for PR48776 (namely
r14-3572-gd58150452976c4ca65ddc811fac78ef956fa96b0 AKA
fortran: Restore interface to its previous state on error [PR48776]),
which cleaned up new changes from interfaces upon error.

Unfortunately, there is one case in that fix that is mishandled, visible
on unexpected_interface.f90 with valgrind or an asan-instrumented gfortran.
when an interface statement is found while parsing an interface body (which
is invalid), the current interface is replaced by the one from the new
statement, and as parsing continues, new procedures are added
to the new interface, which has been rejected and freed, instead of the
original one.

This change restores the current interface pointer to its previous value
on each rejected statement.

PR fortran/48776
PR fortran/111291

gcc/fortran/ChangeLog:

* parse.cc: Restore current interface to its previous value on
error.

[Bug c/102998] Wrong documentation for -Warray-parameter

2024-01-20 Thread sandra at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102998

sandra at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #6 from sandra at gcc dot gnu.org ---
Fixed.

[Bug tree-optimization/113459] ICE: in as_a, at machmode.h:381 with memset() on a _BitInt() at -O1 and above

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113459

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug c/113315] during GIMPLE pass: bitintlower0 ICE: in lower_mergeable_stmt, at gimple-lower-bitint.cc:2310 with _BitInt() used as array index

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113315

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/113316] during GIMPLE pass: bitintlower ICE: SIGSEGV in var_to_partition (tree-ssa-live.h:163) at -O with uninitialized _BitInt() function argument

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113316

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/113323] ICE: tree check: expected none of vector_type, have vector_type in bitint_precision_kind, at gimple-lower-bitint.cc:131 with _BitInt()

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113323

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug target/113324] internal compiler error: in reload_combine_note_use, at postreload.c:1534

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113324

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |11.0

[Bug tree-optimization/113330] ICE: verify_gimple failed: conversion of register to a different size in 'view_convert_expr' with -O -fstack-check=generic and _BitInt()

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113330

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug c++/113389] ICE when explicit object parameter is not declared as the first parameter

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113389

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/113361] wrong code with __builtin_mul_overflow_p() and _BitInt() at -O0

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113361

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug target/113393] RISC-V: Full coverage test bugs for upstream 20240112

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113393

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/113372] wrong code with _BitInt() arithmetics at -O1

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113372

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug middle-end/113406] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:85 with -fstrub=internal and _BitInt() (and __GIMPLE wit

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113406

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/113408] ICE: in handle_cast, at gimple-lower-bitint.cc:1539 at -O with _BitInt()

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113408

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug middle-end/113409] ICE: in omp_extract_for_data, at omp-general.cc:411 with -fopenmp-simd and _BitInt()

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113409

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug middle-end/113410] ICE: in maybe_check_access_sizes, at gimple-ssa-warn-access.cc:3423 with _BitInt() used as array length

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113410

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/113421] wrong code with -O -fno-tree-fre and _BitInt() multiplication

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113421

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/113464] ICE: in lower_asm, at gimple-lower-bitint.cc:5200 with invalid __asm__ on _BitInt() at -O1 and above

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113464

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/113462] ICE: in handle_cast, at gimple-lower-bitint.cc:1539 at -O with _BitInt() in a struct

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113462

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/113491] ICE: SIGSEGV in make_ssa_name_fn (tree-ssanames.cc:354) at -Os with _BitInt() used as switch control expression

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113491

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/112941] during GIMPLE pass: bitintlower ICE: in handle_operand_addr, at gimple-lower-bitint.cc:2126 (gimple-lower-bitint.cc:2134) at -O with _BitInt()

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112941

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug target/30271] -mstrict-align can add an store extra for struct argument passing

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30271

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/113102] during GIMPLE pass: bitintlower ICE: SIGSEGV with _BitInt() at -O1 or -O2

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113102

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug c++/87699] Implement CWG 1512

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87699

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |11.0

[Bug tree-optimization/113463] ICE: in extended_tree, at tree.h:6449 with _BitInt() used as offset

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113463

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug debug/84645] -flto -g0 at compile-time vs. -flto -g at link time ICEs in add_dwarf_attr, at dwarf2out.c:4353

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84645

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug tree-optimization/86724] Compilation error with new isl 0.20 (missing includes)

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |7.4

[Bug testsuite/94253] FAIL: gfortran.dg/bind_c_coms.f90 -O0 (test for excess errors)

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94253

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug other/94629] 10 issues located by the PVS-studio static analyzer

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94629

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/95424] Failure to optimize division with numerator of 1

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95424

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |12.0

[Bug target/96176] Failure to omit extraneous movzx in atomic compare exchange with unsigned char

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96176

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |11.0

[Bug rtl-optimization/96388] scheduling takes forever with -fPIC

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96388

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug c++/99701] std::nullptr_t can be compared with relational ops

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99701

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |12.0

[Bug target/99888] Add powerpc ELFv2 support for -fpatchable-function-entry*

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99888

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |13.0

[Bug middle-end/104355] Misleading -Warray-bounds documentation says "always out of bounds"

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104355

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |12.0

[Bug c/102998] Wrong documentation for -Warray-parameter

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102998

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug target/104401] [x86] Failure to recognize min/max pattern using pcmp+pblendv

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104401

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug target/105525] some targets don't define __INTPTR_TYPE__ breaking libgcov-driver.c

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105525

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug analyzer/106147] RFE: -fanalyzer could complain about some cases of infinite loops and infinite recursion

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106147

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0
   Keywords||diagnostic

[Bug rtl-optimization/106187] armhf: Miscompilation at O2 level (O0 / O1 are working)

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106187

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |11.4

[Bug analyzer/106229] False positives from -Wanalyzer-tainted-array-index with unsigned char index

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106229

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0
   Keywords||diagnostic

[Bug testsuite/106516] New test case gcc.dg/pr104992.c fails on power 10

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106516

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |13.0

[Bug testsuite/106682] Powerpc test gcc.target/powerpc/pr86731-fwrapv-longlong.c fails on power8, passes on power9/power10

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106682

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |13.0

[Bug tree-optimization/107839] spurious "may be used uninitialized" warning while all uses are under "if (c)"

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107839

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |12.3

[Bug ipa/108470] Missing documentation for alternate uses of __attribute__((noinline))

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108470

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug target/108521] gcc/doc/invoke.texi contains remnants of Cygwin options removed in 2010-10-07

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108521

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug target/108640] ICE compiling busybox for m68k in change_address_1, at emit-rtl.cc:2283

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108640

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug target/109253] libbpf: failed to find BTF info for global/extern symbol '__divdi3'

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109253

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug target/109615] Redundant VSETVL after optimized code of RVV

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109615

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug c/110029] more precise documentation for cleanup attribute

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110029

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug target/109811] libjxl 0.7 is a lot slower in GCC 13.1 vs Clang 16

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109811

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug other/110205] Some new warnings from clang for the range code

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110205

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug target/110265] RISC-V: ICE when build RVV intrinsic integer reduction with "-march=rv32gc_zve64d -mabi=ilp32d", both GCC 14 and 13.

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110265

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/112734] ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112734

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32 and -finline-stringops

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112804

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug c/111693] -Wuse-after-free is documented in the wrong location

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111693

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug c/113524] New: FAIL: gcc.dg/torture/pr113026-1.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (test for bogus messages, line 10)

2024-01-20 Thread danglin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113524

Bug ID: 113524
   Summary: FAIL: gcc.dg/torture/pr113026-1.c   -O3
-fomit-frame-pointer -funroll-loops -fpeel-loops
-ftracer -finline-functions   (test for bogus
messages, line 10)
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa*-*-linux*
Target: hppa*-*-linux*
 Build: hppa*-*-linux*

spawn -ignore SIGHUP /home/dave/gnu/gcc/objdir/gcc/xgcc
-B/home/dave/gnu/gcc/obj
dir/gcc/ /home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr113026-1.c
-fdiag
nostics-plain-output -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops
-ftracer -finline-functions -Wall -S -o pr113026-1.s
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr113026-1.c: In function
'foo':
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr113026-1.c:10:12:
warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr113026-1.c:4:6: note: at
offset 16 into destination object 'dst' of size 16
FAIL: gcc.dg/torture/pr113026-1.c   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions   (test for bogus messages, line 10)
PASS: gcc.dg/torture/pr113026-1.c   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions  (test for excess errors)

Only occurs at -O3.

[Bug tree-optimization/113026] Bogus -Wstringop-overflow warning on simple memcpy type loop

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113026

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug c++/104094] Alias template shown in diagnostic with wrong template parameter name

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104094

--- Comment #3 from Andrew Pinski  ---
(In reply to Jonathan Wakely from comment #2)
> _Pattern is used in lazy_split_view, split_view and join_view, none of which
> are used at all by `ranges::to`. Is there some has collision going on here
> when the pretty printer finds names? Does it need an additional
> disambiguation step if more than one name is found?

Maybe that is PR 66968 (or PR 99) which I see are already linked here?

[Bug fortran/82943] [F03] Error with type-bound procedure of parametrized derived type

2024-01-20 Thread ctechnodev at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82943

--- Comment #15 from Alexander Westbrooks  ---
Created attachment 57176
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57176&action=edit
Proposed Patch to fix PR82943, PR86148, PR86268

[Bug fortran/86148] parameterized type compile time error

2024-01-20 Thread ctechnodev at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86148

Alexander Westbrooks  changed:

   What|Removed |Added

 CC||ctechnodev at gmail dot com

--- Comment #6 from Alexander Westbrooks  ---
Created attachment 57177
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57177&action=edit
Proposed Patch to fix PR82943, PR86148, PR86268

[Bug fortran/57360] Implement a warning for implied save

2024-01-20 Thread w6ws at earthlink dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57360

--- Comment #5 from Walter Spector  ---
IMHO this should be a "surprising" warning when -Wsurprising is specified.
  The message should suggest adding an explicit SAVE attribute to make the code
clear.

[Bug fortran/86268] [9.0] Error on correct code with PDTs

2024-01-20 Thread ctechnodev at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86268

Alexander Westbrooks  changed:

   What|Removed |Added

 CC||ctechnodev at gmail dot com

--- Comment #3 from Alexander Westbrooks  ---
Created attachment 57178
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57178&action=edit
Proposed Patch to fix PR82943, PR86148, PR86268

[Bug fortran/113152] Fortran 2023 half-cycle trigonometric functions

2024-01-20 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113152

kargl at gcc dot gnu.org changed:

   What|Removed |Added

  Attachment #56949|0   |1
is obsolete||
  Attachment #56950|0   |1
is obsolete||
  Attachment #56951|0   |1
is obsolete||
  Attachment #56952|0   |1
is obsolete||
  Attachment #56956|0   |1
is obsolete||

--- Comment #12 from kargl at gcc dot gnu.org ---
Created attachment 57179
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57179&action=edit
Patch

Here is a new patch.  It includes an implementation for the half-cycle
trigonometric functions as well as fixes for

PR113412 -- better error message for atan(y,x)
PR113413 -- implement atand(y,x)

Here's text that may be suitable formatted for a ChangeLog.

gfortran:

* gfortran.h (gfc_isym_id): Add GFC_ISYM_ACOSPI, GFC_ISYM_ASINPI,
GFC_ISYM_ATANPI, GFC_ISYM_ATAN2PI, GFC_ISYM_COSPI, GFC_ISYM_SINPI, and
GFC_ISYM_TANPI
* intrinsic.cc (do_check): Whitespace and typo in comments.
(add_functions): Add two-argument form of ATAND.  Add half-cycle 
trigonometric functions ACOSPI, ASINPI, ATANPI, ATAN2PI, COSPI,
SINPI, and TANPI.
(sort_actual): Generate sensible error messages for two argument
versions of ATAN, ATAND, and ATANPI.
* intrinsic.h: New prototypes for gfc_simplify_acospi, 
gfc_simplify_asinpi, gfc_simplify_atanpi, gfc_simplify_atan2pi,
gfc_simplify_cospi, gfc_simplify_sinpi, gfc_simplify_tanpi,
gfc_resolve_acospi, gfc_resolve_asinpi, gfc_resolve_atanpi,
gfc_resolve_atan2pi, gfc_resolve_cospi, gfc_resolve_sinpi, and
gfc_resolve_tanpi
* intrinsic.texi: Document new functions ACOSPI, ASINPI, ATANPI,
ATAN2PI, COSPI, SINPI, and TANPI.  Put the ATAN* family of functions
in lexigraphical order.
* iresolve.cc (gfc_resolve_acospi, gfc_resolve_asinpi,
gfc_resolve_atanpi, gfc_resolve_atan2pi, gfc_resolve_cospi,
gfc_resolve_sinpi, gfc_resolve_tanpi):  New functions.
* simplify.cc (gfc_simplify_acospi, gfc_simplify_asinpi,
gfc_simplify_atanpi, gfc_simplify_atan2pi, gfc_simplify_cospi,
gfc_simplify_sinpi, gfc_simplify_tanpi): New functions.
Introduce MPFR_HALF_CYCLE macros to use MPFR half-cycle functions
if available.
* trans-intrinsic.cc: Declare asinpi, acospi, atanpi, atan2pi, sinpi, 
cospi, and tanpi as LIB_FUNCTION's.

libgfortran 

*Makefile.am: New files trigpi.c, trigpi_fallback1.c, and
trigpi_fallback2.F90
* configure.ac: Check libm for float, double, and long double
functions for asinpi, acospi, atanpi, atan2pi, sinpi, cospi, and
tanpi
* Makefile.in: Regenerated.
* config.h.in: Ditto.
* configure: Ditto.
* gfortran.map: Add GFORTRAN_14 section to expose the library
symbols.
* trigpi.c: Fallback implementations of the half-cycle trigonometric
functions.
* trigpi_fallback1.c: Fallback functions for float, double, and
long double routines if libm does provide them.
* trigpi_fallback2.F90: REAL(16)/REAL(17) fallback implementations
of the half-cycle trigonometric functions.

  1   2   >