[Bug ipa/120596] New: Wrong code on -O2 and above (possibly affecting many versions)

2025-06-08 Thread haoxintu at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, We found a possible wrong-code issue with our new testing tool. Please look at the details below. $cat

[Bug tree-optimization/120295] New: Wrong code on -O3 for trunk version (live code is wrongly eliminated)

2025-05-15 Thread haoxintu at gmail dot com via Gcc-bugs
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, We found an interesting wrong-code issue with our new testing tool. It seems gcc-trunk with -O3 eliminates a live

[Bug tree-optimization/110705] New: ICE at -O2 and above: in gimplify_modify_expr, at gimplify.cc:6255 (on GCC-12.x)

2023-07-17 Thread haoxintu at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, GCC-12.0 to GCC-12.3 versions fail to compile the following code. $cat small.c struct a { long b

[Bug tree-optimization/110129] Possible wrong-code on -O2 and above (affecting versions from GCC-10.1 onward)

2023-06-05 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110129 --- Comment #2 from Haoxin Tu --- (In reply to Andrew Pinski from comment #1) Oops, my bad. Thank you for pointing this out. I didn't notice the front-end is C++ in GodBolt. I have another similar case, can you take a look, please? ``` #includ

[Bug tree-optimization/110129] New: Possible wrong-code on -O2 and above (affecting versions from GCC-10.1 onward)

2023-06-05 Thread haoxintu at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, Please consider the following code, which makes GCC output different results on -O0/1 and -O2/3/s. Note

[Bug ipa/103513] New: [12 Regression] ICE in evaluate_conditions_for_known_args, at ipa-fnsummary.c:516 with -O2 and above

2021-11-30 Thread haoxintu at gmail dot com via Gcc-bugs
Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com CC: marxin at gcc dot gnu.org Target Milestone

[Bug tree-optimization/103237] New: wrong code with -ftree-vectorize at -O1 on x86_64-linux-gnu

2021-11-14 Thread haoxintu at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. This seems a long latent bug existed after GCC-10.1. $cat small.c #include #include

[Bug tree-optimization/103222] [12 Regression] wrong code at -O2 and above on x86_64-linux-gnu

2021-11-13 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103222 --- Comment #6 from Haoxin Tu --- (In reply to Aldy Hernandez from comment #5) > fixed Thank you for the quick fixing!

[Bug tree-optimization/103222] New: [12 Regression] wrong code at -O2 and above on x86_64-linux-gnu

2021-11-13 Thread haoxintu at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. $cat small.c #include #include int16_t a; static uint32_t *b ; static uint8_t

[Bug tree-optimization/103219] New: [12 Regression] ICE Segmentation fault at -O3 (during GIMPLE pass: unrolljam)

2021-11-12 Thread haoxintu at gmail dot com via Gcc-bugs
: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. I am not sure whether there is a dup but it appears to be a

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

2021-11-12 Thread haoxintu at gmail dot com via Gcc-bugs
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. It seems to be a recent regression issue. $cat small.c #include #include int32_t a[6]; int64_t b; int32_t *c

[Bug tree-optimization/103204] New: [11/12 Regression] ICE: in vn_reference_insert_pieces, at tree-ssa-sccvn.c:3842 (on -O2 and above)

2021-11-11 Thread haoxintu at gmail dot com via Gcc-bugs
: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. $cat small.c #include int a[][1]; int b

[Bug tree-optimization/102561] [12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (on -O2 and above)

2021-10-01 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102561 --- Comment #1 from Haoxin Tu --- Similar case: #include int a; void b(int c) { uint16_t d; uint16_t *e; int16_t f; int64_t g; if ((g || (d = 0)) == c << (0 <= (*e ^= c))) *e - f && (a = d); } Error: during GIMPLE pass: vrp-thre

[Bug tree-optimization/102561] New: [12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (on -O2 and above)

2021-10-01 Thread haoxintu at gmail dot com via Gcc-bugs
Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. It appears to be a quite recent regression issue. $cat

[Bug c/102356] New: compile-time explosion at -O3

2021-09-15 Thread haoxintu at gmail dot com via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. It's quite weird that the following small valid program makes GCC spend too much time on compiling at -O3 with the "-g" enabled. It

[Bug target/102057] New: ICE at -O2 in extract_constrain_insn, at recog.c:2670

2021-08-25 Thread haoxintu at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. This program makes GCC ICE. I think this program is syntactically valid and GCC should not emit any error. I found

[Bug middle-end/99694] [9 Regression] gcc: fatal error: Killed signal terminated program cc1 under -O2 to -Os since r9-7156-g33579b59aaf02eb7

2021-08-04 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99694 --- Comment #17 from Haoxin Tu --- Thank you all for the detailed clarification! I have got the answer now. Let's try together to make compilers a better place:)

[Bug middle-end/99694] [9 Regression] gcc: fatal error: Killed signal terminated program cc1 under -O2 to -Os since r9-7156-g33579b59aaf02eb7

2021-08-04 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99694 --- Comment #13 from Haoxin Tu --- (In reply to Martin Liška from comment #12) Ok, got you. Thanks for your speedy reply~

[Bug middle-end/99694] [9 Regression] gcc: fatal error: Killed signal terminated program cc1 under -O2 to -Os since r9-7156-g33579b59aaf02eb7

2021-08-04 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99694 --- Comment #11 from Haoxin Tu --- Hi all. I hope you all are doing well. I am sorry to bother you again. May I ask a quick question about how do you treat the bug-revealing test case which may include the valid syntax but contain the UB? (e.g.

[Bug target/100626] [11/12 Regression] ICE Segmentation fault (during RTL pass: split1) since r11-165-geb72dc663e9070b2

2021-05-17 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100626 --- Comment #4 from Haoxin Tu --- I found that it also crashes (under -O1 and -Os) on today's trunk version of GCC. $cat small.c #include int a; void b() { int c; uint64_t *d = &c; uint8_t *e; if (a) *d &= *e; if (*d) for (;;

[Bug target/100626] ICE Segmentation fault (during RTL pass: split1)

2021-05-16 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100626 --- Comment #1 from Haoxin Tu --- Another test case that crashes on all -O1 to -Os. $cat small.c #include int uc_4, i_5, us_7; void fn1() { int li_18; int64_t *ptr_43 = &li_18; for (; us_7;) { fn2(); *ptr_43 ^= uc_4; } i_5 =

[Bug tree-optimization/100626] New: ICE Segmentation fault (during RTL pass: split1)

2021-05-16 Thread haoxintu at gmail dot com via Gcc-bugs
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. I don't know if there is a dup of this. I have searched but failed. $cat small.c #include int uc_4, i_5, us_7; void fn1() { int li_18; in

[Bug tree-optimization/100578] New: [12 Regression] ICE Segmentation fault during GIMPLE pass: fre (under -g -O2/O3/Os)

2021-05-12 Thread haoxintu at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. $cat small.c #include void a() { int b; c: int8_t d = 3; if (b |= d ^= a >

[Bug tree-optimization/100512] [12 Regression] ICE during GIMPLE pass: cddce in mark_operand_necessary, at tree-ssa-dce.c:173 (under -O2 to -Os)

2021-05-10 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100512 --- Comment #1 from Haoxin Tu --- (In reply to Haoxin Tu from comment #0) > $gcc -w -O2 Sorry, it's an incomplete command here. It should be "gcc -w -O2 small.c".

[Bug tree-optimization/100512] New: [12 Regression] ICE during GIMPLE pass: cddce in mark_operand_necessary, at tree-ssa-dce.c:173 (under -O2 to -Os)

2021-05-10 Thread haoxintu at gmail dot com via Gcc-bugs
: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. $cat

[Bug tree-optimization/100349] New: [11/12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (under -O2 to -Os)

2021-04-30 Thread haoxintu at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. $cat small.c #include uint8_t a; b(int8_t c) { int d; e: uint32_t f; for (;;) for

[Bug tree-optimization/99947] [11 Regression] ICE Segmentation fault "during GIMPLE pass: vect" since r11-4714-g092cdbd919849759

2021-04-07 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99947 --- Comment #7 from Haoxin Tu --- Thank you all for your quick response and fixing! Cheers, Haoxin

[Bug tree-optimization/99947] New: [11 Regression] ICE Segmentation fault "during GIMPLE pass: vect"

2021-04-06 Thread haoxintu at gmail dot com via Gcc-bugs
e-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. $cat small.c #include int a, b, d, e; int16_t c; void f() { f

[Bug c/99880] New: ICE in maybe_set_vectorized_backedge_value, at tree-vect-loop.c:9161

2021-04-01 Thread haoxintu at gmail dot com via Gcc-bugs
-valid-code Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. This valid program makes GCC crash at -O3. GCC-10 also incurs an ICE with a Segmentation

[Bug middle-end/99694] [9 Regression] gcc: fatal error: Killed signal terminated program cc1 under -O2 to -Os since r9-7156-g33579b59aaf02eb7

2021-03-27 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99694 --- Comment #7 from Haoxin Tu --- (In reply to Martin Liška from comment #1) > Confirmed, started with r9-7156-g33579b59aaf02eb7. Hi Martin. I am sorry to bother you, and I just have a question about how to find a bad commit quickly in GCC. As

[Bug c/99694] New: gcc: fatal error: Killed signal terminated program cc1 under -O2 to -Os

2021-03-21 Thread haoxintu at gmail dot com via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. GCC takes too much compiling time and then crashes on the valid small.c under -O2 to -Os. Also, all GCC-9 upward versions

[Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use

2020-12-07 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969 --- Comment #12 from Haoxin Tu --- (In reply to Paul Sokolovsky from comment #11) Awesome! I got your main idea here. Thank you very much, Paul! Best, Haoxin

[Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use

2020-12-07 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969 --- Comment #9 from Haoxin Tu --- (In reply to ktkachov from comment #8) > When I had to do it in the past I've used the 'ulimit' command in linux. > That allows you to kill a process if it exceeds a time limit (ulimit -t) or > a memory limit (u

[Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use

2020-12-05 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969 Haoxin Tu changed: What|Removed |Added CC||haoxintu at gmail dot com --- Comment #7

[Bug tree-optimization/98074] New: [9/10 Regression] C Wrong code at O2~Os

2020-11-30 Thread haoxintu at gmail dot com via Gcc-bugs
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- $cat small.c #include #include struct { int64_t a; } b; struct c { signed d : 9; signed a : 21; signed e : 1; }; int f, g; uint16_t h() { struct c aa = {0

[Bug tree-optimization/98051] ICE in logical_combine, at gimple-range-gori.cc:754 in O2-Os

2020-11-29 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98051 --- Comment #3 from Haoxin Tu --- (In reply to H.J. Lu from comment #2) > Please try the current master branch. Ok, I can't reproduce it in the current trunk, either. Will check more next time before I submit a report. BTW, could you please cl

[Bug c/98051] ICE in logical_combine, at gimple-range-gori.cc:754 in O2-Os

2020-11-29 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98051 --- Comment #1 from Haoxin Tu --- *** Bug 98050 has been marked as a duplicate of this bug. ***

[Bug c/98050] in logical_combine, at gimple-range-gori.cc:754

2020-11-29 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98050 Haoxin Tu changed: What|Removed |Added Resolution|--- |DUPLICATE Status|UNCONFIRMED

[Bug c/98051] New: ICE in logical_combine, at gimple-range-gori.cc:754 in O2-Os

2020-11-29 Thread haoxintu at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. The small.cc makes GCC-trunk crash under O2~Os, while O0-O1 is fine. $cat small.c #include void a

[Bug c/98050] New: in logical_combine, at gimple-range-gori.cc:754

2020-11-29 Thread haoxintu at gmail dot com via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: ---

[Bug c++/96638] New: [10/11 Regression] ICE in chainon, at tree.c:3169

2020-08-16 Thread haoxintu at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Input: //small.cc void foo(int[] alignas[1] alignas()){} Command: g++ small.cc Output: small.cc:1:23: error

[Bug c++/96637] New: ICE in tree check: expected tree_list, have error_mark in cp_check_const_attributes, at cp/decl2.c:1423

2020-08-16 Thread haoxintu at gmail dot com
: UNCONFIRMED Keywords: error-recovery, ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Input: //small.cc void foo(int[] alignas[1

[Bug c++/96636] New: ICE in build_value_init_noctor, at cp/init.c:451

2020-08-16 Thread haoxintu at gmail dot com
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Input: //small.cc typedef class { class a {}; class : virtual a {}; } b; void foo(){ b{};} Command: g++ small.cc Output: small.cc: In function ‘void foo()’: small.cc:5

[Bug c++/96623] New: [10/11 Regression] ICE in inject_parm_decls, at cp/parser.c:23893

2020-08-14 Thread haoxintu at gmail dot com
-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Input: //small.cc struct A{ void a(){ struct B { void b () noexcept

[Bug c++/96553] New: ICE in unexpected expression ‘__alignof__ (auto:1)’ of kind alignof_expr

2020-08-10 Thread haoxintu at gmail dot com
-recovery, ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, reduced by C-Vise, makes GCC-trunk ICE and released

[Bug c++/96552] New: GCC accepts "alignas(auto)" in function parameter list

2020-08-10 Thread haoxintu at gmail dot com
ty: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. Following code is invalid I think, the "alignas" shouldn't be in function parameter. I guess G

[Bug c++/96478] New: GCC accepts enum definition in alignas()

2020-08-04 Thread haoxintu at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code might be a invalid code, but GCC accepts it well. Other mainstream compilers reject this code. Code: namespace { template

[Bug c++/96477] New: GCC accepts attribute 'const' as an attribute pack

2020-08-04 Thread haoxintu at gmail dot com
ty: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. Following code might be a invalid code? GCC accepts it while Clang or ICC rejects it. Code: [[gnu::const ...

[Bug c++/96467] New: [8/9/10/11 Regression] in finish_member_declaration, at cp/semantics.c:3240

2020-08-04 Thread haoxintu at gmail dot com
-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code makes GCC-9.1 onwards versions ICE without any error messages. I

[Bug c++/96465] New: ICE in tsubst_function_decl, at cp/pt.c:13669

2020-08-04 Thread haoxintu at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, similar with bug 96464 code, makes GCC-7.1 onwards versions ICE or "confused by earlier errors

[Bug c++/96462] [10/11 Regression] ICE in tree check: expected identifier_node, have bit_not_expr in find_namespace_slot, at cp/name-lookup.c:97

2020-08-04 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96462 --- Comment #2 from Haoxin Tu --- (In reply to Marek Polacek from comment #1) > Confirmed. Hi, Marek. Thanks for your quick response! Best, Haoxin

[Bug c++/96464] New: GCC allows 'auto' in template argument

2020-08-04 Thread haoxintu at gmail dot com
ty: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code is invalid code I guess, but GCC-6.0 onwards versions accept it. $cat small.cc template class b {}; void foo(){

[Bug c++/96462] New: [10/11 Regression] ICE in tree check: expected identifier_node, have bit_not_expr in find_namespace_slot, at cp/name-lookup.c:97

2020-08-04 Thread haoxintu at gmail dot com
Version: 11.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This

[Bug c++/96442] New: 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

2020-08-03 Thread haoxintu at gmail dot com
: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, reduced by C-Vise, makes GCC-trunk ICE and makes released GCC versions "confused by early errors". Input: //small.cc enum struct a : struct {}; template enum class a : class c{}; enum struct a {b}; Command: g+

[Bug c++/96441] New: ICE in tree check: expected integer_cst, have cond_expr in get_len, at tree.h:5954

2020-08-03 Thread haoxintu at gmail dot com
Keywords: error-recovery, ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, reduced by C-Vise, makes GCC-trunk ICE and

[Bug c++/96440] New: ICE in tree check: expected tree_list, have error_mark in get_attribute_name, at attribs.c:841

2020-08-03 Thread haoxintu at gmail dot com
Keywords: error-recovery, ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, reduced by C-Vise, makes GCC

[Bug c++/96438] New: [10/11 Regression] ICE in do_pushtag, at cp/name-lookup.c:6861

2020-08-03 Thread haoxintu at gmail dot com
, ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, reduced by C-Vise, makes GCC-trunk ICE, while GCC-10 and

[Bug c++/96437] New: [10/11 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246

2020-08-03 Thread haoxintu at gmail dot com
Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, reduced by C-Vise, makes GCC-trunk ICE, while GCC-10 and downwards versions behave well in error-recovery. Input: //small.cc template <()> void A(auto){} Command: g++ small.cc Output: small.cc:1:11: error: ex

[Bug c++/96380] New: [10/11 Regression] ICE in tree check: expected integer_cst, have view_convert_expr in get_len, at tree.h:5954

2020-07-29 Thread haoxintu at gmail dot com
Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This invalid code makes

[Bug c++/96379] New: [ 10/11 Regression ] GCC accepts totally invalid template declaration

2020-07-29 Thread haoxintu at gmail dot com
-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. Input: //small.cc const int a = 0; const long b = 1 ; enum struct c; template enum

[Bug c++/96184] GCC treats "use of local variable with automatic storage from containing function" differently in versions

2020-07-28 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96184 --- Comment #1 from Haoxin Tu --- This behavior still exists in the current trunk. Is this a bug or not? Thanks

[Bug c++/96364] New: ICE on valid code in cp_finish_decl, at cp/decl.c:7537

2020-07-28 Thread haoxintu at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. Weirdly, this simple valid code makes GCC ICE (clang,icc,or msvc accepts this code). Input: //small.cc auto a

[Bug c++/96360] New: ICE in tree check: expected integer_cst, have truth_orif_expr in get_len, at tree.h:5954

2020-07-28 Thread haoxintu at gmail dot com
Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This invalid code makes GCC ICE and without any error diagnostic

[Bug c++/96359] New: ICE in cxx_eval_logical_expression, at cp/constexpr.c:3875

2020-07-28 Thread haoxintu at gmail dot com
-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This invlaid code makes GCC ICE. What shocked me is that when I change the

[Bug c++/96137] [11 Regression] GCC hang on in invalid function definition

2020-07-28 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96137 --- Comment #4 from Haoxin Tu --- Add two cases. I guess the reason is the same. //case1 static_assert (->operator a, "") //case2 alignas (->operator a)

[Bug c++/96329] New: [11 Regression] ICE : tree check: expected string_cst, have error_mark in cp_parser_linkage_specification, at cp/parser.c:14640

2020-07-27 Thread haoxintu at gmail dot com
Version: 11.0 Status: UNCONFIRMED Keywords: error-recovery, ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone

[Bug c++/96328] New: Singe keyword "friend" makes GCC ICE in cp_lexer_previous_token, at cp/parser.c:769

2020-07-26 Thread haoxintu at gmail dot com
NCONFIRMED Keywords: error-recovery, ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. Weirdly, a single "friend" make

[Bug c++/96219] New: New Feature (c++ core 727): explicit specialization in class definition should be allowed

2020-07-16 Thread haoxintu at gmail dot com
Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi,all. http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#727

[Bug c++/96210] New: Diagnostic message for using-directive in template definition should be more clear?

2020-07-15 Thread haoxintu at gmail dot com
Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. Alias template is allowed since c++11 while using-directive is not. The

[Bug c++/96209] New: Redundant error message split out when adding "typename" keyword

2020-07-15 Thread haoxintu at gmail dot com
diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, test1.cc and test2.cc ( they are in the same meaning I guess), are invalid c

[Bug c++/96207] New: GCC accepts "delete" function definition inside a class member function

2020-07-15 Thread haoxintu at gmail dot com
s: accepts-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, test.cc, is an invalid code, GCC compiles it well, while other

[Bug c++/96162] [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910

2020-07-14 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162 --- Comment #1 from Haoxin Tu --- Add a more case. $cat p.cc #include int a() { for (static int & b) {} } $g++ p.cc test.cc: In function ‘int a()’: test.cc:3:24: error: expected ‘;’ before ‘)’ token 3 | for (static int & b) {}

[Bug c++/96184] New: GCC treats "use of local variable with automatic storage from containing function" differently in versions

2020-07-13 Thread haoxintu at gmail dot com
sion: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, GCC-trunk and other versions (etc., GCC-10

[Bug c++/96183] New: GCC accepts "convert '' from 'void' to 'int'" at compile time

2020-07-13 Thread haoxintu at gmail dot com
RMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi,all. This code, test.cc, is an invalid code but GCC accept

[Bug c++/96182] GCC accepts constexpr function with no return-statement

2020-07-13 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96182 --- Comment #2 from Haoxin Tu --- (In reply to Jakub Jelinek from comment #1) > The difference is that in C++11 the standard requires that the body of a > constexpr function is return expression, that is not the case of C++14 > anymore. > And, yo

[Bug c++/96182] New: GCC accepts constexpr function with no return-statement

2020-07-13 Thread haoxintu at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi,all. This code, test.cc, is an invalid code I guess, but GCC accepts it. $cat test.cc constexpr int foo

[Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910

2020-07-10 Thread haoxintu at gmail dot com
: error-recovery, ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, test.cc, is an invalid code, makes GCC-trunk ICE

[Bug c++/96145] New: Weird output in compiling a typedef union as a function return type

2020-07-10 Thread haoxintu at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, test.cc, uses a typedef name of a union as a return type of a function, the GCC compiled output might be weird

[Bug c++/96137] [11 Regression] GCC hang on in invalid function definition

2020-07-09 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96137 --- Comment #3 from Haoxin Tu --- (In reply to Marek Polacek from comment #2) > I would treat them just like ICEs. They are useful if the testcase isn't > complete garbage. This one is sort of useful because it shows that my > change above has

[Bug c++/96137] [11 Regression] GCC hang on in invalid function definition

2020-07-09 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96137 --- Comment #1 from Haoxin Tu --- Also, I want to know are those cases (invalid code but makes GCC hang on) worth reporting? If those cases can help improve the GCC FE or its performance, I will continue to file more reports. Otherwise, I will ju

[Bug c++/96137] New: [11 Regression] GCC hang on in invalid function definition

2020-07-09 Thread haoxintu at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This simple code makes GCC-trunk hang on. The memory seems ok, only with endless compiling. $cat bug.cc void a () { .operator b } $g

[Bug c++/96120] Ambiguity diagnostic message of "invalid use of type 'void' in parameter declaration"

2020-07-08 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96120 --- Comment #3 from Haoxin Tu --- (In reply to Jonathan Wakely from comment #1) > (In reply to Haoxin Tu from comment #0) > > GCC might emit the ambiguity diagnostic message on it. > > What does that mean? Apologize for my expression. I mean th

[Bug c++/96120] New: Ambiguity diagnostic message of "invalid use of type 'void' in parameter declaration"

2020-07-08 Thread haoxintu at gmail dot com
Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, test.cc, GCC might emit the ambiguity diag

[Bug c++/96119] New: GCC accepts invalid qualifier in a try-catch block

2020-07-08 Thread haoxintu at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code might be an invalid code, but GCC accepts this well. $cat test.cc int main(){ try {} catch (int

[Bug c++/96118] New: GCC accepts invalid combination of two type specifiers

2020-07-08 Thread haoxintu at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, combines a typedef specifier and a normal type specifier, might be an invalid code. $cat test.cc typedef long

[Bug c++/96116] New: GCC accepts "enum struct/class" in reference to enumeration

2020-07-08 Thread haoxintu at gmail dot com
ts-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi,all. This code, might be an invalid code, but GCC accepts it. $cat test.cc using alias1 = e

[Bug c++/95972] ICE in check_member_template, at cp/decl2.c:570

2020-07-08 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95972 --- Comment #4 from Haoxin Tu --- (In reply to Marek Polacek from comment #3) > You can still use creduce (I do), but it's good to try adding missing > parens/braces and similar to make the code more sensible. Yes, you are right. Thanks for you

[Bug c++/96110] Function declarator with a trailing return type "auto" should be allowed in try-catch block

2020-07-08 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96110 --- Comment #5 from Haoxin Tu --- (In reply to Jonathan Wakely from comment #2) > This isn't specific to catch handlers, other compilers accept that nonsense > function declaration in various contexts, and GCC rejects them all: Thanks for your c

[Bug c++/95972] ICE in check_member_template, at cp/decl2.c:570

2020-07-08 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95972 --- Comment #2 from Haoxin Tu --- Update a new case. Input: int a() { [] ( auto class {int b()}} Output: : In function 'int a()': :1:27: error: types may not be defined in parameter types 1 | int a() { [] ( auto class {int b()}} |

[Bug c++/96110] New: Function declarator with a trailing return type "auto" should be allowed in try-catch block

2020-07-08 Thread haoxintu at gmail dot com
NCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. The code test.cc int main(){ try {} catch

[Bug c++/96097] ICE in dependent_type_p, at cp/pt.c:26326

2020-07-08 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96097 Haoxin Tu changed: What|Removed |Added CC||haoxintu at gmail dot com --- Comment #3

[Bug c++/96103] New: Unclear diagnostic for a function return with "decltype(auto)"

2020-07-07 Thread haoxintu at gmail dot com
diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, "decltype(auto)" in return type is a c++14 extension and I guess GCC

[Bug c++/96082] New: GCC rejects the template disambiguator with "typename"

2020-07-06 Thread haoxintu at gmail dot com
ty: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, test.cc, GCC rejects it in versions from 9.1 to trunk, but accepts it from 8.3 to 4.8 versions. $c

[Bug c++/96077] GCC accepts ill-legal local enum definition

2020-07-06 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96077 --- Comment #2 from Haoxin Tu --- (In reply to Jonathan Wakely from comment #1) > It's not ideal to provide a testcase that doesn't compile for an > accepts-invalid bug. A testcase that actually compiles is a better > demonstration that the inval

[Bug c++/96077] New: GCC accepts ill-legal local enum definition

2020-07-06 Thread haoxintu at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code, test.cc, has a grammar issue in "missing ')'", but GCC accepts it well. $cat test.cc enum { a = ( 1

[Bug c++/96068] New: Extra semicolon outside of a function should be allowed after c++11?

2020-07-05 Thread haoxintu at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. As the summary, extra ";" should be allowed in GCC after -std=c++11 and should

[Bug c++/96057] New: -Wreturn-type warning message disappears with -O1 to -Os in unnamed namespace definition

2020-07-04 Thread haoxintu at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This small code, bug.cc, the -Wreturn-type warning disappears when add -O1 or higher optimization option

[Bug c++/96048] New: ICE in get_local_decls, at cp/name-lookup.c:3591

2020-07-03 Thread haoxintu at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- This invalid code, bug.cc, makes GCC-trunk ICE. $cat bug.cc struct a {template class A;}; a : b ( auto ) ( class { }); $g++ -c -w

[Bug c++/96045] New: Wrong line and column diagnostic message in a class template instantiation

2020-07-03 Thread haoxintu at gmail dot com
: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- This simple code, bug.cc, GCC-trunk can not emit the right diagnostic information. $cat bug.cc

[Bug c++/95932] ICE in redeclare_class_template, at cp/pt.c:6231

2020-07-02 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95932 --- Comment #1 from Haoxin Tu --- Add a more meaningful case. $cat p.cc template class a {}; template > struct a < class b{}, struct b {}>; $g++ p.cc p.cc:2:28: error: expected ‘class’ or ‘typename’ before ‘>’ token 2 | template >

  1   2   >