[Bug c/83197] ICE in strip_float_extensions, at tree.c:11935

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=83656
  Known to fail||8.1.0
 Resolution|--- |DUPLICATE

--- Comment #3 from Andrew Pinski  ---
GCC 9+ produces (via r9-4162):
: In function 'f':
:5:7: warning: too few arguments to built-in function 'sqrt' expecting
1 [-Wbuiltin-declaration-mismatch]
5 |   a = sqrt ();
  |   ^~~~
:2:8: note: declared here
2 | double sqrt ();
  |^~~~
: In function 'f1':
:12:7: warning: too few arguments to built-in function 'sin' expecting
1 [-Wbuiltin-declaration-mismatch]
   12 |   a = sin ();
  |   ^~~
:9:8: note: declared here
9 | double sin ();
  |^~~


The ICE is not there in 8.4+ too.

Dup of bug 89520.

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

[Bug c/89520] [7 Regression] ICE tree check: accessed operand 4 of call_expr with 3 operands in convert_to_integer_1, at convert.c:668

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

--- Comment #13 from Andrew Pinski  ---
*** Bug 83197 has been marked as a duplicate of this bug. ***

[Bug c++/85229] [concepts] ICE with local class in lambda

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

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2018-09-27 00:00:00 |2021-8-8

--- Comment #1 from Andrew Pinski  ---
So this is correctly rejected with -std=c++20 (even after removing the bool).
With -std=c++17 -fconcepts this ICEs.

[Bug c++/101817] New: g++ apply optimization irrespective of -O0 flag is set

2021-08-08 Thread mohan.rajanna at ict dot nl via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101817

Bug ID: 101817
   Summary: g++ apply optimization irrespective of -O0 flag is set
   Product: gcc
   Version: 9.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mohan.rajanna at ict dot nl
  Target Milestone: ---

Created attachment 51273
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51273&action=edit
disassemble log captured during gdb session

Hello Team,

I observe g++ applies optimization even when -O0 flag is used for compiling.

I am performing unit testing with CMocka setup. Due to optimization, I am
unable to test stub function call to strncmp().

Please Note: Stub function call to strncmp() will work in some cases but most
of the time, function calls are optimized.

I am performing debug build, cmake build log with verbose argument says source
file is compiled with below example. I believe in this case -O0 is applied by
default.
Example:
std=c++14 -g   -o test.c.o -c test.c

Just for Information:
I manually applied -O0 in CMakeLists.txt with this line 
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") and below was the cmake verbose log.
std=c++14 -g -O0   -o test.c.o -c test.c

Please find the attachment to see disassemble log captured during gdb session. 

Please find below the versions used for g++, cmake, ubuntu:

g++ --version
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

cmake --version
cmake version 3.16.3

Ubuntu 20.04.2 LTS

This is inconsistent behaviour with -O0 flag. Sometimes this flag disables the
optimization but not always.

Kind Regards
Mohan

[Bug c++/84633] internal compiler error: in lvalue_kind, at cp/tree.c:206

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

--- Comment #4 from Andrew Pinski  ---
Seems fixed in GCC 11+.

[Bug c++/87536] Illegal recursive concept leads to compiler ICE

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-08-08
 Ever confirmed|0   |1

--- Comment #2 from Andrew Pinski  ---
With -std=c++20 I get crash:
:3:6: warning: C++20 concept definition syntax is 'concept  =
'
3 | bool concept X = X;
  |  ^~~
g++: internal compiler error: Segmentation fault signal terminated program
cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
Compiler returned: 4

[Bug c++/101817] g++ apply optimization irrespective of -O0 flag is set

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

--- Comment #1 from Andrew Pinski  ---
Use -fno-builtins

[Bug c++/71174] [concepts] Segmentation fault while processing concepts error

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

--- Comment #6 from Andrew Pinski  ---
This seems fixed in GCC 11+.

[Bug c++/101817] g++ apply optimization irrespective of -O0 flag is set

2021-08-08 Thread mohan.rajanna at ict dot nl via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101817

--- Comment #2 from Mohan  ---
With -fno-builtins argument, it works good !!

[Bug c++/68429] [concepts] ICE in in placeholder_extract_concept_and_args, at cp/constraint.cc:1401

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #5 from Andrew Pinski  ---
Fixed.

[Bug c++/67491] [meta-bug] concepts issues

2021-08-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
Bug 67491 depends on bug 68429, which changed state.

Bug 68429 Summary: [concepts] ICE in in placeholder_extract_concept_and_args, 
at cp/constraint.cc:1401
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68429

   What|Removed |Added

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

[Bug c++/82019] [concepts] ICE if concept is not satisfied

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED
   Target Milestone|--- |10.0

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

[Bug c++/67491] [meta-bug] concepts issues

2021-08-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
Bug 67491 depends on bug 82019, which changed state.

Bug 82019 Summary: [concepts] ICE if concept is not satisfied
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82019

   What|Removed |Added

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

[Bug c++/92481] g++ 9.2.0 SegFault

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

Andrew Pinski  changed:

   What|Removed |Added

  Known to work||11.1.0
  Known to fail||10.3.0
   Keywords||error-recovery

--- Comment #4 from Andrew Pinski  ---
Seems fixed in GCC 11+.

[Bug c++/92837] ICE on syntax error in requires clause, in cp_parser_constraint_primary_expression

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Andrew Pinski  ---
Dup of bug 92517.

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

[Bug c++/92517] [10 Regression] ICE on incorrect syntax involving requires and decltype

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||arthur.j.odwyer at gmail dot 
com

--- Comment #6 from Andrew Pinski  ---
*** Bug 92837 has been marked as a duplicate of this bug. ***

[Bug c/90841] ICE in get_atomic_generic_size, at c-family/c-common.c:6904

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #2 from Andrew Pinski  ---
Dup of bug 96545.

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

[Bug c/96545] ICE in get_atomic_generic_size

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||gs...@t-online.de

--- Comment #8 from Andrew Pinski  ---
*** Bug 90841 has been marked as a duplicate of this bug. ***

[Bug c++/91405] [concepts] internal compiler error: in synthesize_implicit_template_parm, at cp/parser.c:41206

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #7 from Andrew Pinski  ---
Fixed.

[Bug c++/67491] [meta-bug] concepts issues

2021-08-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
Bug 67491 depends on bug 91405, which changed state.

Bug 91405 Summary: [concepts] internal compiler error: in 
synthesize_implicit_template_parm, at cp/parser.c:41206
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91405

   What|Removed |Added

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

[Bug c++/91277] test.cpp:5:55: internal compiler error: in synthesize_implicit_template_parm, at cp/parser.c:41206

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|FIXED   |DUPLICATE

--- Comment #2 from Andrew Pinski  ---
Dup

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

[Bug c++/91405] [concepts] internal compiler error: in synthesize_implicit_template_parm, at cp/parser.c:41206

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||mr...@courier-mta.com

--- Comment #8 from Andrew Pinski  ---
*** Bug 91277 has been marked as a duplicate of this bug. ***

[Bug c++/71543] [concepts] ICE on ill-formed declaration of a parameter with a constrained-type-specifier in a requires expression

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|FIXED   |DUPLICATE

--- Comment #7 from Andrew Pinski  ---
Dup.

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

[Bug c++/91405] [concepts] internal compiler error: in synthesize_implicit_template_parm, at cp/parser.c:41206

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||tom at honermann dot net

--- Comment #9 from Andrew Pinski  ---
*** Bug 71543 has been marked as a duplicate of this bug. ***

[Bug c++/92541] ICE when concept requires contextual conversion to bool

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #8 from Andrew Pinski  ---
Fixed.

[Bug c++/67491] [meta-bug] concepts issues

2021-08-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
Bug 67491 depends on bug 92541, which changed state.

Bug 92541 Summary: ICE when concept requires contextual conversion to bool
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92541

   What|Removed |Added

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

[Bug c++/93664] ICE: Segmentation fault on invalid concept code gcc/gcc/cp/constraint.cc:2537

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

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2021-08-08
 Status|UNCONFIRMED |NEW

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

[Bug c++/93741] ICE in incomplete concept definition

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

--- Comment #2 from Andrew Pinski  ---
Seems to work in GCC 11+.

[Bug c++/93785] g++ crash/hang on invalid template

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

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2020-02-18 00:00:00 |2021-8-8

--- Comment #1 from Andrew Pinski  ---
Clang produces:

:4:3: fatal error: recursive template instantiation exceeded maximum
depth of 1024
  b d
  ^~~~

[Bug c++/80143] ICE on placement new in gimplify_init_ctor_eval, at gimplify.c:4436

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

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |8.0
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Andrew Pinski  ---
This was fixed in GCC 8+.  Most likely by r8-4783.

[Bug c/95124] internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in diag_attr_exclusions, at attribs.c:396

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

--- Comment #1 from Andrew Pinski  ---
Looks like this is fixed, I cannot even reproduce it with GCC 10.1.0.

[Bug c++/64924] Callback function passed as a parameter with typename declaration produces an ICE.

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

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||accepts-invalid

--- Comment #3 from Andrew Pinski  ---
Short testcase:
template
struct PP
{
PP(typename PP::gg n);
typedef void (T::*gg)(void);
};
template
PP::PP(gg n) {}
 CUT 
We also accept invalid code too:
template
struct PP
{
PP(typename PP::gg n);
typedef int gg;
};
template
PP::PP(gg n) {}

[Bug c++/94333] ICE in tsubst_template_args at gcc/cp/pt.c:13074 ( when trying use structure binding in requires(requires{}))

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

--- Comment #2 from Andrew Pinski  ---
(In reply to Martin Liška from comment #1)
> Confirmed, started with r9-4045-g0c1e0d63fe0ceabb.
> Before that it was rejected with:
> 
> pr94333.cc:7:45: error: lambda-expression in unevaluated context
> 7 | static yes check(U u) requires(requires{[](auto u){auto [a, b] =
> u;}(u);});

Right because the lambda-expression in unevaluated context feature was not
supported before that patch :).

This code is valid and works with GCC 10.2.0 and 11+.

Note clang trunk ICEs on it.

[Bug c++/94333] ICE in tsubst_template_args at gcc/cp/pt.c:13074 ( when trying use structure binding in requires(requires{}))

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #3 from Andrew Pinski  ---
Dup of bug 94128.

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

[Bug c++/94128] ICE on C++20 "requires requires" with lambda

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||dmusiienko at gmail dot com

--- Comment #6 from Andrew Pinski  ---
*** Bug 94333 has been marked as a duplicate of this bug. ***

[Bug c++/95999] [9/10/11/12 Regression] ICE in tree check: expected integer_cst, have var_decl in get_len, at tree.h:5951

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

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |9.5
   Severity|normal  |trivial
Summary|ICE in tree check: expected |[9/10/11/12 Regression] ICE
   |integer_cst, have var_decl  |in tree check: expected
   |in get_len, at tree.h:5951  |integer_cst, have var_decl
   ||in get_len, at tree.h:5951

[Bug c++/95955] ICE: tree check: expected integer_type or enumeral_type or boolean_type or real_type or fixed_point_type, have union_type in int_fits_type_p, at tree.c:8952

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #2 from Andrew Pinski  ---
Dup of bug 96442.

s/union/struct/ in the testcase in comment #0 and you will get exact testcase.

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

[Bug c++/96442] [9/10/11/12 Regression] ICE in tree check: expected integer_type or enumeral_type or boolean_type or real_type or fixed_point_type, have record_type in int_fits_type_p, at tree.c:8954

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

--- Comment #3 from Andrew Pinski  ---
*** Bug 95955 has been marked as a duplicate of this bug. ***

[Bug c++/95455] ICE in capture with initializer in requires block

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

--- Comment #5 from Andrew Pinski  ---
Clang gives:
:5:16: error: reference to local variable 'foo' declared in enclosing
function 'f'
[bar = foo] {};
   ^
:3:9: note: 'foo' declared here
int foo;
^

[Bug c++/101818] New: Error message for the wrong name in designated initializers could be improved

2021-08-08 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101818

Bug ID: 101818
   Summary: Error message for the wrong name in designated
initializers could be improved
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hewillk at gmail dot com
  Target Milestone: ---

Consider: https://godbolt.org/z/8xrocoTcG

struct Op { int a, b; };
Op op{.a = 0,
  .x = 0,


  .b = 0};


Clang rejects with:
:3:8: error: field designator 'x' does not refer to any field in type
'Op'
  .x = 0,
   ^
However, GCC rejects with:
:6:13: error: 'Op' has no non-static data member named 'x'
6 |   .b = 0};
  | ^


It would be less confusing and more user-friendly if the cursor can actually
point to the x.

[Bug c++/101537] -Wconversion false positive in ternary

2021-08-08 Thread nok.raven at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101537

Nikita Kniazev  changed:

   What|Removed |Added

 CC||nok.raven at gmail dot com

--- Comment #1 from Nikita Kniazev  ---
int foo(unsigned char x, bool f) {
x |= f ? 1 : 0; // warning
return x;
}

int bar(unsigned char x, bool f) {
x = x | f ? 1 : 0; // no warning
return x;
}

it also warns only for self-operators

[Bug c++/101818] Error message for the wrong name in designated initializers could be improved

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
This is a dup of bug 95085.

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

[Bug c++/95085] diagnostic on designated-initializer from braced-init-list could be better

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||hewillk at gmail dot com

--- Comment #2 from Andrew Pinski  ---
*** Bug 101818 has been marked as a duplicate of this bug. ***

[Bug middle-end/28498] fstack-protector causes crash in combination with -Os

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

Andrew Pinski  changed:

   What|Removed |Added

  Known to fail||
   Target Milestone|--- |4.4.7
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Andrew Pinski  ---
There is no way to reproduce this issue post 4.4.7. So closing

[Bug middle-end/47011] ICE when using attribute optimize

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
   Target Milestone|--- |4.5.0
 Status|UNCONFIRMED |RESOLVED

--- Comment #4 from Andrew Pinski  ---
Fixed so closing.

[Bug c++/101689] ICE with -fvtable-verify=std and -fnon-call-exceptions

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #7 from Andrew Pinski  ---
Dup of bug 59507.

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

[Bug middle-end/59507] ICE: in mark_reachable_handlers, at tree-eh.c:3833 with -O -fnon-call-exceptions -fvtable-verify=preinit

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||Theodore.Papadopoulo@inria.
   ||fr

--- Comment #7 from Andrew Pinski  ---
*** Bug 101689 has been marked as a duplicate of this bug. ***

[Bug c++/98101] ICE in mark_reachable_handlers, at tree-eh.c:4033

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #4 from Andrew Pinski  ---
Dup of bug 59507.

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

[Bug middle-end/59507] ICE: in mark_reachable_handlers, at tree-eh.c:3833 with -O -fnon-call-exceptions -fvtable-verify=preinit

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||gs...@t-online.de

--- Comment #8 from Andrew Pinski  ---
*** Bug 98101 has been marked as a duplicate of this bug. ***

[Bug c++/98101] ICE in mark_reachable_handlers, at tree-eh.c:4033

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

--- Comment #5 from Andrew Pinski  ---
(In reply to scott snyder from comment #3)
> Here's another example that crashes in the same place, but which doesn't use
> -fvtable-verify.  This example does use vectorization, and the ICE occurs
> only with -O3.  Seen with gcc  11.0.0 20201128.

This is a different bug and I can't reproduce it in a newer gcc 11.

[Bug middle-end/36791] ICE with constant argument to __builtin_eh_return

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #2 from Andrew Pinski  ---
This is a dup of bug 67619 which is fixed in GCC 4.9.4, GCC 5.3.0, and GCC 6+

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

[Bug middle-end/67619] ICE at -O1 and above on x86_64-linux-gnu in int_mode_for_mode, at stor-layout.c:425

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||jfc at mit dot edu

--- Comment #7 from Andrew Pinski  ---
*** Bug 36791 has been marked as a duplicate of this bug. ***

[Bug target/14839] configure does not check for the presence of 32bits libc with --disable-multilib

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
   Target Milestone|--- |4.9.0
 Status|SUSPENDED   |RESOLVED

--- Comment #7 from Andrew Pinski  ---
r0-127201 fixed the x86_64-linux-gnu issue so closing.

[Bug c++/89062] class template argument deduction failure with parentheses

2021-08-08 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89062

Patrick Palka  changed:

   What|Removed |Added

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

[Bug tree-optimization/25623] jump threading messes up "incoming frequencies" for some BBs

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

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2006-03-02 12:57:12 |2021-8-8
  Known to fail||4.4.7, 4.9.1, 5.1.0, 7.1.0

--- Comment #6 from Andrew Pinski  ---
For comment #1 in GCC 8+, the problem shows up in thread1:
;;   Invalid sum of incoming counts 332256647 (estimated locally), should be
365072220 (estimated locally)


On the trunk in thread1:
;;   basic block 6, loop depth 0, count 0 (precise), probably never executed
;;   Invalid sum of incoming counts 20359759 (estimated locally), should be 0
(precise)
;;prev block 5, next block 7, flags: (NEW, VISITED)
;;pred:   4 [never]  count:0 (precise) (TRUE_VALUE,EXECUTABLE)
;;5 [11.4% (guessed)]  count:20359759 (estimated locally)
(TRUE_VALUE,EXECUTABLE)
  # .MEM_16 = PHI <.MEM_11(4), .MEM_12(5)>
  # .MEM_8 = VDEF <.MEM_16>
  # USE = nonlocal 
  # CLB = nonlocal 
  abortD.1081 ();
;;succ:  

;;   basic block 7, loop depth 0, count 1073741824 (estimated locally), maybe
hot
;;   Invalid sum of incoming counts 1053382065 (estimated locally), should be
1073741824 (estimated locally)
;;prev block 6, next block 1, flags: (NEW, VISITED)
;;pred:   5 [88.6% (guessed)]  count:158087543 (estimated locally)
(FALSE_VALUE,EXECUTABLE)
;;4 [always]  count:186624922 (estimated locally)
(FALSE_VALUE,EXECUTABLE)
;;2 [66.0% (guessed)]  count:708669600 (estimated locally)
(FALSE_VALUE,EXECUTABLE)
  # .MEM_9 = PHI <.MEM_12(5), .MEM_11(4), .MEM_4(D)(2)>
  # VUSE <.MEM_9>
  return;
;;succ:   EXIT [always]  count:1073741824 (estimated locally)
(EXECUTABLE)

[Bug tree-optimization/26602] cfg cleanup can mess up incoming frequencies

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

Andrew Pinski  changed:

   What|Removed |Added

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

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

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

[Bug tree-optimization/25623] jump threading/cfg cleanup messes up "incoming counts" for some BBs

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

--- Comment #7 from Andrew Pinski  ---
*** Bug 26602 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/25623] jump threading/cfg cleanup messes up "incoming counts" for some BBs

2021-08-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25623
Bug 25623 depends on bug 26602, which changed state.

Bug 26602 Summary: cfg cleanup can mess up incoming frequencies
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26602

   What|Removed |Added

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

[Bug middle-end/8093] Wrong warning by gcc suggests adding dead code to end of function

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

Andrew Pinski  changed:

   What|Removed |Added

  Known to fail||

--- Comment #5 from Andrew Pinski  ---
We have __builtin_unreachable() now, so maybe this is not as important.

[Bug middle-end/23999] DECL_SIZE set to NULL at times

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

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |10.0
 Resolution|--- |INVALID
 Status|NEW |RESOLVED

--- Comment #4 from Andrew Pinski  ---
r10-2596 changed the documentation of DECL_SIZE to allow for null.

[Bug tree-optimization/33257] guaranteed-true test not optimized away when input values later used

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

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=89518
   Keywords||missed-optimization
 Resolution|--- |FIXED
  Known to fail||9.1.0
  Component|rtl-optimization|tree-optimization
  Known to work||10.1.0
 Status|UNCONFIRMED |RESOLVED

--- Comment #3 from Andrew Pinski  ---
Fixed in GCC 10+ by r10-137.

[Bug tree-optimization/33258] guaranteed-true arithmetic test not optimized away depending on constant

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

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization
   Target Milestone|--- |10.0
  Component|rtl-optimization|tree-optimization
 Status|UNCONFIRMED |RESOLVED
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=89518,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=33257
 Resolution|--- |FIXED

--- Comment #3 from Andrew Pinski  ---
Fixed in GCC 10+ by r10-137.

[Bug c++/94162] ICE [neg] bad return type in defaulted <=>

2021-08-08 Thread dacamara.cameron at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94162

--- Comment #10 from Cameron  ---
(In reply to Andrew Pinski from comment #9)
> None of the testcases ICE in GCC 11+

I notice that if I change the repro to:

#include 

struct S {
  int a;
  int* operator<=>(const S&) const = default;
};

bool b = S{} < S{};


Notice the use of 'int*' as the comparison type.  GCC11 series will still
crash.

[Bug target/101812] [12 Regression] ICE: Segmentation fault (in ix86_expand_sse_movcc) since r12-731-gb1f7fd8a2a5558da

2021-08-08 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101812

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org,
   ||uros at gcc dot gnu.org
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-08-08
Summary|[12 Regression] ICE:|[12 Regression] ICE:
   |Segmentation fault (in  |Segmentation fault (in
   |ix86_expand_sse_movcc)  |ix86_expand_sse_movcc)
   ||since
   ||r12-731-gb1f7fd8a2a5558da
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, started with r12-731-gb1f7fd8a2a5558da.

[Bug c++/80143] ICE on placement new in gimplify_init_ctor_eval, at gimplify.c:4436

2021-08-08 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80143

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #4 from Martin Liška  ---
I think it was rather fixed in r8-7466-g3ec16e3610721403.

[Bug target/101812] [12 Regression] ICE: Segmentation fault (in ix86_expand_sse_movcc) since r12-731-gb1f7fd8a2a5558da

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

Uroš Bizjak  changed:

   What|Removed |Added

   Target Milestone|--- |12.0
 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |ubizjak at gmail dot com
Version|unknown |12.0

--- Comment #2 from Uroš Bizjak  ---
Patch in testing:

--cut here--
diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index 0984f7cc44d..2d3b63f0834 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -952,7 +952,7 @@
(set_attr "prefix" "orig,vex")
(set_attr "mode" "V4SF")])

-(define_insn "*mmx_v2sf3"
+(define_insn "v2sf3"
   [(set (match_operand:V2SF 0 "register_operand" "=x,x")
(any_logic:V2SF
  (match_operand:V2SF 1 "register_operand" "%0,x")
--cut here--

[Bug target/101819] New: [12 Regression] ICE in expand_expr_real_2, at expr.c:9552 since r12-2789-gf31da42e047e8018ca6ad9809273bc7efb6ffcaf

2021-08-08 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101819

Bug ID: 101819
   Summary: [12 Regression] ICE in expand_expr_real_2, at
expr.c:9552 since
r12-2789-gf31da42e047e8018ca6ad9809273bc7efb6ffcaf
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: rguenth at gcc dot gnu.org
  Target Milestone: ---
  Host: x86_64-linux-gnu
Target: riscv64-unknown-linux-gnu

The following fails:

$ ./xgcc -B.
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/execute/pr51581-1.c
-ftree-loop-vectorize -O1 -S
during RTL pass: expand
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/execute/pr51581-1.c:
In function ‘f2’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/execute/pr51581-1.c:24:10:
internal compiler error: in expand_expr_real_2, at expr.c:9552
   24 | d[i] = b[i] / 3;
  | ~^~
0xdd51c5 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
/home/marxin/Programming/gcc2/gcc/expr.c:9552
0xdd91fb expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/marxin/Programming/gcc2/gcc/expr.c:10480
0xdd1573 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
/home/marxin/Programming/gcc2/gcc/expr.c:8713
0xdb0813 expand_expr
/home/marxin/Programming/gcc2/gcc/expr.h:301
0xdd60ef expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
/home/marxin/Programming/gcc2/gcc/expr.c:9780
0xdd91fb expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/marxin/Programming/gcc2/gcc/expr.c:10480
0xdd1573 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
/home/marxin/Programming/gcc2/gcc/expr.c:8713
0xdb0848 expand_normal
/home/marxin/Programming/gcc2/gcc/expr.h:307
0xdcc54a store_field
/home/marxin/Programming/gcc2/gcc/expr.c:7439
0xdc8875 store_constructor_field
/home/marxin/Programming/gcc2/gcc/expr.c:6672
0xdcb9fe store_constructor
/home/marxin/Programming/gcc2/gcc/expr.c:7289
0xdd14b4 expand_constructor
/home/marxin/Programming/gcc2/gcc/expr.c:8634
0xddaad0 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/marxin/Programming/gcc2/gcc/expr.c:10819
0xdd1573 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
/home/marxin/Programming/gcc2/gcc/expr.c:8713
0xdd923f expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/marxin/Programming/gcc2/gcc/expr.c:10484
0xdd1573 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
/home/marxin/Programming/gcc2/gcc/expr.c:8713
0xdc658f store_expr(tree_node*, rtx_def*, int, bool, bool)
/home/marxin/Programming/gcc2/gcc/expr.c:6064
0xdc4e24 expand_assignment(tree_node*, tree_node*, bool)
/home/marxin/Programming/gcc2/gcc/expr.c:5796
0xc3a209 expand_gimple_stmt_1
/home/marxin/Programming/gcc2/gcc/cfgexpand.c:3945
0xc3a5fe expand_gimple_stmt
/home/marxin/Programming/gcc2/gcc/cfgexpand.c:4043
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug target/22599] ICE with invalid asm usage

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
   Target Milestone|--- |4.4.0

--- Comment #5 from Andrew Pinski  ---
Fixed back with r0-91401 for GCC 4.4.0.

[Bug target/39442] In some cases __builtin_ia32_loadups generates a movaps instruction

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
   Keywords||wrong-code
  Known to fail||4.1.2
  Known to work||4.4.7, 4.5.3, 4.6.4, 4.7.1,
   ||4.9.1, 6.1.0
 Resolution|--- |FIXED
   Target Milestone|--- |4.4.0

--- Comment #6 from Andrew Pinski  ---
Fixed in GCC 4.4.0.

[Bug tree-optimization/59299] We do not sink loads

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

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |5.0

[Bug middle-end/40207] request for enhancement: delay argument loading until needed

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED
 Depends on||59299

--- Comment #3 from Andrew Pinski  ---
Fixed in GCC 5+ by r5-1146.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59299
[Bug 59299] We do not sink loads

[Bug target/42200] Suboptimal optimization: after x / 2 carry flag == x & 1

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

--- Comment #2 from Andrew Pinski  ---
GCC 8+ produces this for both:
cmpl$1, %edi
jbe .L1
testb   $1, %dil
je  .L4
.L1:
ret
.L4:
shrl%edi
jmp a

[Bug middle-end/42543] ICE when using va_arg

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

Andrew Pinski  changed:

   What|Removed |Added

  Known to work||4.6.4, 4.7.1
 Status|NEW |RESOLVED
   Target Milestone|--- |4.6.0
  Known to fail||4.5.3
 Resolution|--- |FIXED

--- Comment #6 from Andrew Pinski  ---
Fixed in GCC 4.6.0, there was many var_arg changes in GCC 4.6.0 that would have
fixed this.

[Bug target/43153] Pass -mtune=i686 to assembler for -march=i686 or higher

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

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2021-08-08
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
Confirmed.  Though I don't know how important it is any more with x86_64 being
in the majority now.

[Bug c++/80143] ICE on placement new in gimplify_init_ctor_eval, at gimplify.c:4436

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

--- Comment #5 from Andrew Pinski  ---
(In reply to Martin Liška from comment #4)
> I think it was rather fixed in r8-7466-g3ec16e3610721403.

Yes that is more likely, I was trying to find that but I could not :).

[Bug c++/94162] ICE [neg] bad return type in defaulted <=>

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

Andrew Pinski  changed:

   What|Removed |Added

  Known to work|11.1.0  |

--- Comment #11 from Andrew Pinski  ---
(In reply to Cameron from comment #10)
> Notice the use of 'int*' as the comparison type.  GCC11 series will still
> crash.

Confirmed, this testcase ICEs on the trunk also.

[Bug libfortran/101820] New: fatal error: ISO_Fortran_binding.h: No such file or directory

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

Bug ID: 101820
   Summary: fatal error: ISO_Fortran_binding.h: No such file or
directory
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libfortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ubizjak at gmail dot com
  Target Milestone: ---

There are quite some FAILs in the gfortran testsuite, e.g.:

FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -O0  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -O1  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -O2  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions  (test for excess
errors)
FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -O3 -g  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -Os  (test for excess errors)
...

where:

/home/uros/git/gcc/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.c:3:10:
fatal error: ISO_Fortran_binding.h: No such file or directory
compilation terminated.
compiler exited with status 1
FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -O3 -g  (test for excess errors)
Excess errors:
/home/uros/git/gcc/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.c:3:10:
fatal error: ISO_Fortran_binding.h: No such file or directory
compilation terminated.

UNRESOLVED: gfortran.dg/ISO_Fortran_binding_1.f90   -O3 -g  compilation failed
to produce executable


The file ISO_Fortran_binding.h is present in the libgfortran build directory,
but it looks to me that -I is missing when building the testcase:

/home/uros/gcc-build/gcc/testsuite/gfortran/../../gfortran
-B/home/uros/gcc-build/gcc/testsuite/gfortran/../../
-B/home/uros/gcc-build/x86_64-pc-linux-gnu/./libgfortran/
/home/uros/git/gcc/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.f90
-fdiagnostics-plain-output -fdiagnostics-plain-output -O3 -g -pedantic-errors
/home/uros/git/gcc/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.c -dumpbase 
-B/home/uros/gcc-build/x86_64-pc-linux-gnu/./libgfortran/.libs
-L/home/uros/gcc-build/x86_64-pc-linux-gnu/./libgfortran/.libs
-L/home/uros/gcc-build/x86_64-pc-linux-gnu/./libgfortran/.libs
-L/home/uros/gcc-build/x86_64-pc-linux-gnu/./libatomic/.libs
-B/home/uros/gcc-build/x86_64-pc-linux-gnu/./libquadmath/.libs
-L/home/uros/gcc-build/x86_64-pc-linux-gnu/./libquadmath/.libs
-L/home/uros/gcc-build/x86_64-pc-linux-gnu/./libquadmath/.libs -lm -o
./ISO_Fortran_binding_1.exe
/home/uros/git/gcc/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.c:3:10:
fatal error: ISO_Fortran_binding.h: No such file or directory
compilation terminated.

Adding "-I/home/uros/gcc-build/x86_64-pc-linux-gnu/libgfortran" to the above
command fixes the compilation.

[Bug middle-end/21223] Output register variable is reloaded into the wrong register for asm

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=87600,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=86939,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=87899
  Known to fail||4.9.0, 8.1.0
   Target Milestone|--- |9.0
 Status|NEW |RESOLVED
  Known to work||9.1.0

--- Comment #5 from Andrew Pinski  ---
So this is fully fixed in GCC 9+. LRA fixes the problems that reload had.  (LRA
had a similar bug but had been fixes see the linked bug reports).

[Bug middle-end/24590] Static function named "main" treated as the real main

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

--- Comment #5 from Andrew Pinski  ---
config/frv/frv.h:#define INVOKE__main
config/rs6000/eabi.h:#define INVOKE__main

I think the other ones that invokve __main is mingw/cygwin targets.
I wonder if there is a way to get rid of this really.

[Bug middle-end/29864] Folding conversion unsigned long long to float

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

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |4.4.0
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Andrew Pinski  ---
Fixed at r0-87005.

[Bug middle-end/29253] expand_abs wrong default code for floating point

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

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2008-02-04 14:27:46 |2021-8-8

--- Comment #12 from Andrew Pinski  ---
This is still true as far as I can tell by reading the code.
The case where it will happen is REAL_MODE_FORMAT does not have a simple sign
bit or 

GET_MODE_SIZE (mode) <= UNITS_PER_WORD && the mode does not exist

Which I think the first is true for IBM 128bit long doubles.

Note I don't know if IBM 128bit long double is an important use case.

[Bug middle-end/46119] -fsplit-stack - code crashes when passing large struct via stack

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

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2021-08-08
  Known to work||4.8.0, 4.8.5
Summary|-fsplit-stack   |-fsplit-stack - code
   |-fstack-protector-all - |crashes when passing large
   |code crashes when passing   |struct via stack
   |large struct via stack  |
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
  Known to fail||4.9.0

--- Comment #2 from Andrew Pinski  ---
-fsplit-stack is enough.  It worked in GCC 4.7.x and 4.8.x but broke again in
4.9.0.

The one where it worked main had (clang also has this):
leaq-32776(%rsp), %r11
cmpq%fs:112, %r11
jae .L6

The one where it fails has:

leaq-16392(%rsp), %r11
cmpq%fs:112, %r11

[Bug c++/101783] unnecessary error when top level cv qualifier is dropped

2021-08-08 Thread nickhuang99 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101783

nick huang  changed:

   What|Removed |Added

 CC||nickhuang99 at hotmail dot com

--- Comment #5 from nick huang  ---
Created attachment 51274
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51274&action=edit
suggested fix for PR101783

Here is my suggested fix for this bug. The root cause of this bug is that it
considers reference with cv qualifier as an error by generating value for
variable "bad_quals". However, this is not correct for case of typedef. Here I
quote spec:
"Cv-qualified references are ill-formed except when the cv-qualifiers
are introduced through the use of a typedef-name ([dcl.typedef],
[temp.param]) or decltype-specifier ([dcl.type.decltype]),
in which case the cv-qualifiers are ignored."

[Bug middle-end/40317] verify_flow_info ICE with nested functions and non-local goto/labels

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

Andrew Pinski  changed:

   What|Removed |Added

Summary|verify_flow_info ICE with   |verify_flow_info ICE with
   |nested functions|nested functions and
   ||non-local goto/labels
   Last reconfirmed|2012-02-03 00:00:00 |2021-8-8

--- Comment #2 from Andrew Pinski  ---
Still fails on the trunk.

[Bug middle-end/54068] Compiler passes wrong argument to function when using optimize attribute with -O3

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #3 from Andrew Pinski  ---
251901a027bf (Jakub Jelinek2014-02-06 11:54:20 +0100  6619)  
/* Caller and callee must agree on the calling convention, so
251901a027bf (Jakub Jelinek2014-02-06 11:54:20 +0100  6620)
 checking here just optimize means that with
251901a027bf (Jakub Jelinek2014-02-06 11:54:20 +0100  6621)
 __attribute__((optimize (...))) caller could use regparm convention
251901a027bf (Jakub Jelinek2014-02-06 11:54:20 +0100  6622)
 and callee not, or vice versa.  Instead look at whether the callee
251901a027bf (Jakub Jelinek2014-02-06 11:54:20 +0100  6623)
 is optimized or not.  */

So dup of bug 60062.

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

[Bug target/60062] [4.7 Regression] wrong code (for code with the optimize attribute) at -O1 and above on x86_64-linux-gnu in 32-bit mode

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||vogu00 at gmail dot com

--- Comment #12 from Andrew Pinski  ---
*** Bug 54068 has been marked as a duplicate of this bug. ***

[Bug middle-end/47011] ICE when using attribute optimize

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

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=60062

--- Comment #5 from Andrew Pinski  ---
(In reply to Mat Hostetter from comment #3)
> In the full example this meant g++ miscompiled std::vector::begin to use the
> wrong calling convention, which when linked into other objects expecting the
> proper calling convention would cause a crash.

That was PR 60062.

[Bug middle-end/34475] TLS and PIE don't mix on x86_64

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

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://sourceware.org/bugz
   ||illa/show_bug.cgi?id=10434
 Status|ASSIGNED|RESOLVED
 Resolution|--- |MOVED

--- Comment #4 from Andrew Pinski  ---
It was a binutils issue, and has been fixed for a long time now (~12 years).
See https://sourceware.org/bugzilla/show_bug.cgi?id=10434 .

[Bug tree-optimization/51428] Some code after SSA expand does nothing

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

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org
  Component|middle-end  |tree-optimization

--- Comment #3 from Andrew Pinski  ---
Mine for GCC 13 for bitfield lowering.
With the current code I have (which is applied to GCC 10 base compiler), we
get:
  _7 = MEM  [(struct f *)a_5(D)];
  _8 = _7 & 3;
  _3 = _8 != 0;
  _10 = BIT_INSERT_EXPR <_7, _3, 0 (1 bits)>;
  MEM  [(struct f *)a_5(D)] = _10;

And:
  _8 = _7 & 3;
  _6 = _8 == 3;
  _10 = BIT_INSERT_EXPR <_7, _6, 0 (1 bits)>;

both are not good really as we don't need to extract bit 0 really.

[Bug tree-optimization/101821] New: Redundant xor eax eax

2021-08-08 Thread llvm at rifkin dot dev via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101821

Bug ID: 101821
   Summary: Redundant xor eax eax
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: llvm at rifkin dot dev
  Target Milestone: ---

Gcc is generating an unnecessary and redundant xor eax eax in the following
code

#include 
#include 
uint32_t pop(uint32_t n) {
return std::popcount(n);
}


pop(unsigned int):
xor eax, eax
popcnt  eax, edi
ret

https://godbolt.org/z/81o1Y6T5x

[Bug tree-optimization/101821] Redundant xor eax eax

2021-08-08 Thread llvm at rifkin dot dev via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101821

--- Comment #1 from Jeremy R.  ---
This happens with __builtin_popcount as well, not just std::popcount. This
appears to have started in GCC 4.9.2. https://godbolt.org/z/4dGWvT5zr

[Bug middle-end/50168] __builtin_ctz() and intrinsics __bsr(), __bsf() generate extra sign extend on x86_64

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #12 from Andrew Pinski  ---
Dup of bug 29776.

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

[Bug target/29776] result of ffs/clz/ctz/popcount/parity are already sign-extended

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||gpiez at web dot de

--- Comment #24 from Andrew Pinski  ---
*** Bug 50168 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/101821] Redundant xor eax eax related to popcount intrinsic

2021-08-08 Thread llvm at rifkin dot dev via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101821

Jeremy R.  changed:

   What|Removed |Added

Summary|Redundant xor eax eax   |Redundant xor eax eax
   |related to  |related to popcount
   |__builtin_popcount  |intrinsic

--- Comment #2 from Jeremy R.  ---
Seems to effect all

[Bug target/101821] Redundant xor eax eax

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

Andrew Pinski  changed:

   What|Removed |Added

  Component|tree-optimization   |target
Summary|Redundant xor eax eax   |Redundant xor eax eax
   |related to popcount |
   |intrinsic   |
 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Andrew Pinski  ---
This is by design.

/* X86_TUNE_AVOID_FALSE_DEP_FOR_BMI: Avoid false dependency
   for bit-manipulation instructions.  */
DEF_TUNE (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI, "avoid_false_dep_for_bmi",
  m_SANDYBRIDGE | m_CORE_AVX2 | m_GENERIC)

[Bug target/101821] Redundant xor eax eax

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

--- Comment #4 from Jakub Jelinek  ---
That is not unnecessary nor redundant, but fully intentional.
See e.g. PR62011.

[Bug target/101821] Redundant xor eax eax

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

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=62011

--- Comment #5 from Andrew Pinski  ---
See PR 62011 for more details.

[Bug tree-optimization/101822] New: Codegen bug for popcount

2021-08-08 Thread llvm at rifkin dot dev via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101822

Bug ID: 101822
   Summary: Codegen bug for popcount
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: llvm at rifkin dot dev
  Target Milestone: ---

GCC cleverly optimizes the following loop into a popcount intrinsic:

uint32_t foo(uint32_t n) {
uint32_t count = 0;
while(n) {
n &= n - 1;
count++;
}
return count;
}

But the generated assembly is highly redundant https://godbolt.org/z/nbGb13G5W:

foo(unsigned int):
xor eax, eax
xor edx, edx
popcnt  eax, edi
testedi, edi
cmove   eax, edx
ret

if(n == 0) __builtin_unreachable(); does seem to help the compiler's analysis.

It seems here the compiler is not realizing both the loop and popcnt intrinsic
are well-defined for n == 0. This is closely related to another bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101821.

[Bug target/101821] Redundant xor eax eax

2021-08-08 Thread llvm at rifkin dot dev via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101821

--- Comment #6 from Jeremy R.  ---
Ah thank you @Andrew Pinski @Jakub Jelinek

[Bug target/101821] Redundant xor eax eax

2021-08-08 Thread llvm at rifkin dot dev via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101821

--- Comment #7 from Jeremy R.  ---
Does the false dependency still apply to modern CPUs?

  1   2   >