[Bug c/115644] [gcc][trunk] ICE if redeclare a variable with different type

2024-06-25 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115644 --- Comment #1 from wierton <141242068 at smail dot nju.edu.cn> --- This crash seems to be the same cause: https://gcc.godbolt.org/z/6br3xoaKG The testing program: ``` void f() { int p; unsigned v; v = (~0u) >> p; int p[1] = p; } ```

[Bug c/115646] New: [gcc][trunk] ICE in gen_conditions_for_pow_int_base, at tree-call-cdce.cc:587

2024-06-25 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler explorer: https://gcc.godbolt.org/z/rax1zezbc The testing program: ``` #include struct S { unsigned

[Bug c/115644] New: [gcc][trunk] ICE if redeclare a variable with different type

2024-06-25 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Quick verification link: https://gcc.godbolt.org/z/fdY8KqhK6 The testing program: ``` void foo () { int p[5]; int v = *p; int *p

[Bug c/115642] New: [gcc][trunk] internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_expr_sizeof_expr

2024-06-25 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler explorer: https://gcc.godbolt.org/z

[Bug c/115641] New: GCC crashes on function has attribute `__attribute__((const))`

2024-06-25 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/79oo9rsxj When compiling this with `gcc-trunk -O2`, gcc crashes. This only occurs

[Bug c/114597] [GCC-14] Miscompilation of pointer assignment with inline assembly

2024-04-05 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114597 --- Comment #5 from wierton <141242068 at smail dot nju.edu.cn> --- (In reply to Xi Ruoyao from comment #4) > I believe the second form is still incorrect and it just works by luck. To > ensure it work you have to do: > > a

[Bug c/114598] [GCC-14] Miscompilation of `#pragma omp parallel for`

2024-04-04 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114598 wierton <141242068 at smail dot nju.edu.cn> changed: What|Removed |Added Status|UNCONFIRMED |RE

[Bug c/114598] New: [GCC-14] Miscompilation of `#pragma omp parallel for`

2024-04-04 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/MPzrsv17v ``` #include #define N 2000 int a[N][N]; int main (void) { int i = 0, j = 0; for (i = 0; i < N

[Bug c/114597] [GCC-14] Miscompilation of pointer assignment with inline assembly

2024-04-04 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114597 --- Comment #3 from wierton <141242068 at smail dot nju.edu.cn> --- Thanks a lot, I have checked it out. I'm still somewhat confused. Does the difference in compilation stem from GCC interpreting "=m" and "=r" differe

[Bug c/114597] New: [GCC-14] Miscompilation of pointer assignment with inline assembly

2024-04-04 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/Pn4EG3zzj ``` struct node { void *p; } n; struct head { struct node *n; } h; int

[Bug c/114205] New: Miscompilation: the use of __builtin_object_size cause asan failure.

2024-03-01 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- This program: ``` #include static char a[40]; int main() { if (__builtin_object_size([0] + 1, 1) == (size_t)-1

[Bug c/114203] New: Miscompilation: A possible miscompilation in GCC 13 and 14 with option -Os

2024-03-01 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The reproduce link: https://gcc.godbolt.org/z/T48jbo5e7 The reproducer (diff: `gcc-14 -O0` and `gcc-14 -Os`): ``` int

[Bug c/112512] New: GCC: 14: internal compiler error: in lra_split_hard_reg_for, at lra-assigns.cc:1861

2023-11-13 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/jG4PfK845 When compiling this program with `gcc-14 -Og`, gcc ICEs

[Bug c/112511] New: GCC: 14: internal compiler error: in type_contains_placeholder_1, at tree.cc:4243

2023-11-13 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/E457vrbGM When compiling this program with `gcc-14 -O2`, gcc ICEs

[Bug c/112509] New: GCC: 14: internal compiler error: in verify_range, at value-range.cc:1132

2023-11-13 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/151vEnafj When compiling this program with `gcc-14 -O2 -fno-tree-vrp -fno

[Bug c/112505] New: GCC: 14: internal compiler error: in build_vector_from_val, at tree.cc:2104

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/nTjnh73xj The crash triggering program (compile with `gcc-14 -O3

[Bug c/112504] New: gcc: 14: internal compiler error: in operand_equal_p, at fold-const.cc:3313

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/YdETsKzeb When compiling this program with `gcc-14 -O0`, gcc crashes

[Bug c/112503] New: GCC: 14: internal compiler error: Segmentation fault at gsi_start_edge(edge_def*)

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/erEvbYYKc When compiling this program with `gcc-14 -O1`, gcc crashes

[Bug c/112502] New: GCC: 14: internal compiler error: in get_predictor_value, at predict.cc:2695

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/WP94TWqj5 When compiling this program with `gcc-14 -O1`, gcc crashes

[Bug c/112501] New: GCC: 14: internal compiler error: in extract_insn, at recog.cc:2804

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/65TGaK86r When compiling this program with `gcc-14 -O1`, gcc crashes: ``` short b

[Bug c/112500] New: GCC: 14: internal compiler error: in expand_asm_stmt, at cfgexpand.cc:3419

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/PbTj4Gq3r When compiling this program with `gcc-14 -O0`, gcc crashes

[Bug c/112499] New: GCC: 14: internal compiler error: output_operand: invalid expression as operand

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/MdacfWqhr When attempting to compile this program with `gcc-14 -O1

[Bug c/112496] New: GCC: 14: internal compiler error: in vectorizable_nonlinear_induction, at tree-vect-loop.cc:9573

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/7aq3hjbjK When compile

[Bug c/112495] GCC: 14: internal compiler error: verify_gimple failed

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112495 --- Comment #1 from wierton <141242068 at smail dot nju.edu.cn> --- Correction: It should be -O3.

[Bug c/112495] New: GCC: 14: internal compiler error: verify_gimple failed

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/7sM17Pfbb When compile this program with `gcc-14 -O1`, gcc ICEs: ``` typedef struct { int v; } T1; typedef struct

[Bug c/112494] New: GCC: 14: internal compiler error: in ix86_cc_mode, at config/i386/i386.cc:16477

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/cPPxenx7q When compile this program with `-Og -fno-tree-copy-prop

[Bug c/112493] New: GCC: 14: internal compiler error: in verify_sra_access_forest, at tree-sra.cc:2421

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/971ccPba8 When tries to compile this program with `gcc-14 -O1`, gcc

[Bug c/112489] New: GCC: 14: internal compiler error: in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:647

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/89rPW14fv When compile this program

[Bug c/112488] New: GCC: 14: internal compiler error: in make_ssa_name_fn, at tree-ssanames.cc:354

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler explorer: https://gcc.godbolt.org/z/h9aen36q7 When compile this program with `gcc-14 -O1`, gcc ICEs

[Bug ipa/112486] GCC: 14: hangs with always_inline

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112486 wierton <141242068 at smail dot nju.edu.cn> changed: What|Removed |Added Status|UNCONFIRMED |RE

[Bug c/112487] New: GCC: 14: internal compiler error: in setup_one_parameter, at tree-inline.cc:3565

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler explorer: https://gcc.godbolt.org/z/fjErPvrvP When compile this program with `gcc-14 -O1`, gcc crashes

[Bug c/112486] New: GCC: 14: hangs with always_inline

2023-11-12 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/3n34j7fPT When try to compile this program with `gcc-14 -O2`: ``` unsigned long flg = 0; int n_1 = {0}; __attribute__((always_inline

[Bug c/111922] GCC: internal compiler error: in decompose, at wide-int.h:1049

2023-10-22 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111922 --- Comment #1 from wierton <141242068 at smail dot nju.edu.cn> --- Compiler Explorer: https://gcc.godbolt.org/z/EoPGKa9r8 The link above seems broken.

[Bug c/111922] New: GCC: internal compiler error: in decompose, at wide-int.h:1049

2023-10-22 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: [https://gcc.godbolt.org/z/EoPGKa9r8](https://gcc.godbolt.org/z/EoPGKa9r8) The code that triggers the crash

[Bug c/111921] New: GCC: 14: internal compiler error: Segmentation fault

2023-10-22 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compile this program with GCC, gcc segfaults: ``` _Atomic(int) a; const double b; int main(void) { void f(void *arg) { return ; } return a |= b

[Bug c/111915] New: GCC: ICEs on a program with __restrict and option `-O2 -fno-tree-vrp -fno-tree-dominator-opts -fno-tree-ccp`

2023-10-21 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compile this program, GCC crashes: ``` void foo (int * __restrict a, int

[Bug c/111914] New: GCC: 14: ICE when function pointer array as arguments

2023-10-21 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/Yn354q5zP When compile this program with `-O0`, gcc crashes: ``` __attribute__((always_inline)) void f(int n, int

[Bug c/111913] New: GCC: 14: -O1 compile __builtin_popcount fails while -O0 succeeds

2023-10-21 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compile this program with `-O1`, gcc crashes: ``` int f(unsigned int x, unsigned int y) { return __builtin_popcount (x

[Bug c/111912] New: GCC: 14: internal compile error when apply __transaction_atomic on logical or expr

2023-10-21 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compile this small program: ``` int a; int f() { return __transaction_atomic (a || 1); } ``` GCC crashes

[Bug c/111911] New: GCC: 14: internal compiler error: internal compiler error: in gimplify_expr, at gimplify.cc:17510

2023-10-21 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compile this program, GCC crashes: ``` int main(void) { if !((_Bool)(__INT_MAX__ + 1

[Bug c/111887] GCC: 14: A potential miscompilation with __builtin_inf

2023-10-19 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111887 --- Comment #2 from wierton <141242068 at smail dot nju.edu.cn> --- Thanks for you reply, I got it!

[Bug c/111887] New: GCC: 14: A potential miscompilation with __builtin_inf

2023-10-19 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- I am uncertain whether this program contains undefined behavior, the testcase is: ``` extern void abort (void); void test(double f, double i) { if (i

[Bug c/111886] New: GCC: 14: internal compiler error: in tree_to_uhwi, at tree.cc:6467

2023-10-19 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The ICE trigger: ``` void f() { __builtin_eh_return_data_regno(-1);; } ``` Verification link: https://gcc.godbolt.org/z

[Bug c/111882] New: GCC: 14: internal compiler error: in get_expr_operands, at tree-ssa-operands.cc:940

2023-10-19 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/h9MMnxbvK When compile this program with option -O2, gcc crashes

[Bug c/111865] New: GCC: 14: internal compiler error: symtab_node::verify failed

2023-10-18 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compile this program, gcc crashes: ``` register unsigned long x asm("rsp"); struct { int a; } * p asm("rsp&q

[Bug c/111862] New: GCC: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_parser_omp_clause_reduction, at c/c-parser.cc:16234

2023-10-18 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The bug triggering

[Bug c/111856] New: GCC: 14: internal compiler error: in as_a, at machmode.h:381

2023-10-17 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compile this program with option `-fopenmp-simd`, gcc crashes: ``` typedef void T; int array[1000]; #pragma omp declare simd

[Bug c/111855] New: GCC: 14: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:265

2023-10-17 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compile

[Bug c/111834] New: GCC: 14: out of memory when __builtin_return_address receive a large constant

2023-10-16 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/7d63G6fWT Testcase is pasted below: ``` void *retaddr; void foo (void

[Bug c/111833] GCC: 14: hangs on a simple for loop

2023-10-16 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111833 --- Comment #1 from wierton <141242068 at smail dot nju.edu.cn> --- The compiler explore link above is broken, here is the link: https://gcc.godbolt.org/z/779zzjcze

[Bug c/111833] New: GCC: 14: hangs on a simple for loop

2023-10-16 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: [https://gcc.godbolt.org/](https://gcc.godbolt.org/) Here is the code snippet that is causing the issue: ```c unsigned char a[1]; unsigned char b; void f(void

[Bug c/111821] New: GCC: 14: continue to consume memory until OOM

2023-10-14 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The bug triggering program: ``` typedef union { char a[1003263430]; } __attribute__((__packed__)) T; void f(const void *p) { unsigned short v; *(T *)(void

[Bug c/111820] New: GCC: 14: hangs with a simple while loop

2023-10-14 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://godbolt.org/z/ezdG5GGd8 When compile below program with option `-O3 -fno-tree-vrp`, GCC consumes upto 46 seconds to finish: ``` int r; int r_0

[Bug c/111819] New: GCC: 14: internal compiler error: in fold_offsetof, at c-family/c-common.cc:6877

2023-10-14 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The bug triggering program: ``` long long a; void f(_Complex double x) { (int *)&__imag( *(_Complex do

[Bug c/111818] New: GCC: 14: internal compiler error: tree check: expected tree that contains 'decl common' structure, have 'integer_cst' in tree_could_trap_p, at tree-eh.cc:2733

2023-10-14 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compile

[Bug c/111817] New: GCC: 14: internal compiler error: in expand_asm_stmt, at cfgexpand.cc:3389

2023-10-14 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The bug triggering program: ``` static int foo(int x, int y, int z) { int b; asm("" : "=a"(b), &

[Bug c/111816] New: GCC: 14: internal compiler error: Segmentation fault at c_parser_parse_gimple_body

2023-10-14 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compile this program with GCC-14, GCC crashes: ``` __GIMPLE (ssa) int foo (int *a) { return 0; return 0

[Bug c/111810] New: GCC-14 segfault: error: expected declaration or statement at end of input

2023-10-14 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compile this program with `gcc-14 -O0`, gcc crashes: ``` void = {0}; void uninliner_1() { {} inline __RTL test(void

[Bug c/111809] GCC-14: internal error, internal compiler error: in release_function_body, at cgraph.cc:1805

2023-10-14 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111809 --- Comment #1 from wierton <141242068 at smail dot nju.edu.cn> --- Full stack backtrace: : In function 'bar': :8:1: error: SSA name '' with version 3 has no definition 8 | } | ^ At top level: cc1: internal compiler

[Bug c/111809] New: GCC-14: internal error, internal compiler error: in release_function_body, at cgraph.cc:1805

2023-10-14 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Reproducer: https://godbolt.org/z/MP7qnTKz6 when compile this with `gcc-14 -O0 -fgimple`, gcc crashes

[Bug c/110737] New: GCC: internal compiler error: Segmentation fault when processing __builtin_isinf and _Atomic long double together

2023-07-19 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When attempting to compile below program using gcc-14

[Bug target/110736] gcc: internal compiler error: in change_stack, at reg-stack.cc:2709

2023-07-19 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110736 --- Comment #1 from wierton <141242068 at smail dot nju.edu.cn> --- It looks like this is similar to bug 110667, but ICEs under different optimization option (-Ofast with -Os).

[Bug c/110736] New: gcc: internal compiler error: in change_stack, at reg-stack.cc:2709

2023-07-19 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The bug triggering program: ``` long double a, b; long double f(long double x) { asm("sqxbr\t%0,%1" : "

[Bug c/110699] New: internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754

2023-07-17 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compiling below program using gcc-14 with option `gcc-14

[Bug c/110693] New: internal compiler error: Segmentation fault

2023-07-16 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compiling below program using gcc-14 with option `gcc-14 a.c`, gcc-14 crashes: ``` char global; void bar (void); void __GIMPLE (ssa) foo (char * p) { __BB(2

[Bug c/110682] New: GCC, ICE: internal compiler error: in gimplify_expr, at gimplify.cc:16771

2023-07-16 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compiling below program using gcc-14 with option `gcc-14 -Ofast a.c`, gcc-14 crashes: ``` struct a { const signed

[Bug c/110667] New: gcc-14, ICE: internal compiler error: in replace_reg, at reg-stack.cc:722

2023-07-14 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compiling below program using gcc-14 with option `gcc-14 -Ofast a.c`, gcc-14 crashes: ``` #include #include void f

[Bug c/110603] New: GCC, ICE: internal compiler error: in verify_range, at value-range.cc:1104

2023-07-09 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The testing program: ``` typedef long unsigned int size_t; void *memcpy(void *, const void *, size_t); int snprintf(char

[Bug c/110575] New: gcc: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in build_aligned_type

2023-07-06 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The testcase: ``` void __GIMPLE(ssa, startwith(&quo

[Bug c/110500] New: gcc: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_parser_omp_clause_allocate

2023-06-30 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The program: ``` $ cat small.c int f, l, ll, r

[Bug middle-end/96365] GCC report impossible constraint on possible inline assembly output constraints

2023-06-14 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96365 wierton <141242068 at smail dot nju.edu.cn> changed: What|Removed |Added Status|UNCONFIRMED |RE

[Bug c/110154] When compiling __builtin_frame_address with a relatively large argument, GCC-trunk takes up a significant amount of time.

2023-06-07 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110154 wierton <141242068 at smail dot nju.edu.cn> changed: What|Removed |Added Resolution|--- |I

[Bug c/110154] New: When compiling __builtin_frame_address with a relatively large argument, GCC-trunk takes up a significant amount of time.

2023-06-07 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- This behavior can be verified on https

[Bug middle-end/109917] gcctk hangs at -O0 but normally terminates at -O2

2023-05-20 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109917 --- Comment #2 from wierton <141242068 at smail dot nju.edu.cn> --- (In reply to Andrew Pinski from comment #1) > Dup of bug 109520. > > Where is this code located anyways? > > *** This bug has been marked as a du

[Bug c/109917] New: gcctk hangs at -O0 but normally terminates at -O2

2023-05-20 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Below is the testcase: ``` int foo(int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11, int a12, int a13, int a14

[Bug middle-end/109842] New: GCC-12 hangs on simple piece of inline assembly code

2023-05-13 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The bug-triggering testcase: ``` $ cat c.c static int t; int f_tt; int f(void) { int tt1; asm("" : "=r"(f_tt), "=r&qu

[Bug c/104983] New: gcc ignore side effect inside CommaExpr and failed to update value variable's value

2022-03-18 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The code: ``` int main() { int a = 0; unsigned long long one = 1; unsigned long long crf1 = 0; unsigned

[Bug c/96365] GCC report impossible constraint on possible inline assembly output constraints

2020-07-29 Thread 141242068 at smail dot nju.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96365 --- Comment #2 from wierton <141242068 at smail dot nju.edu.cn> --- (In reply to Jakub Jelinek from comment #1) > Any reason why you can't just write "=a"(x), "=b"(y), "=c"(z) if you mean > that as

[Bug c/96365] New: GCC report impossible constraint on possible inline assembly output constraints

2020-07-29 Thread 141242068 at smail dot nju.edu.cn
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- $ cat a.c int main() { int x = 0, y = 0, z = 0; asm("" : "=ab"(x), "=bc"(y), &

[Bug c/92346] gcc mis-compute the side effect of inline assembly and produce code with unexpected output

2019-11-04 Thread 141242068 at smail dot nju.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92346 --- Comment #4 from wierton <141242068 at smail dot nju.edu.cn> --- (In reply to Andrew Pinski from comment #3) > (In reply to wierton from comment #2) > > This code can reproduce the phenomenon and there are no output constr

[Bug c/92346] gcc mis-compute the side effect of inline assembly and produce code with unexpected output

2019-11-04 Thread 141242068 at smail dot nju.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92346 --- Comment #2 from wierton <141242068 at smail dot nju.edu.cn> --- (In reply to Andrew Pinski from comment #1) > This code is clearly undefined. > > First you say eax is in eax and then then you say the register gets > clobb

[Bug c/92346] New: gcc mis-compute the side effect of inline assembly and produce code with unexpected output

2019-11-03 Thread 141242068 at smail dot nju.edu.cn
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Code is attached: ``` #include int set_eax(int val) { return val; } int main() { int ax, tmp

[Bug c++/85071] The g++ delete the memory alloced by new operator before I manually delete it.

2018-03-26 Thread 141242068 at smail dot nju.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85071 --- Comment #3 from wierton <141242068 at smail dot nju.edu.cn> --- (In reply to Jonathan Wakely from comment #2) > Both valgrind and AddressSanitizer would have found this bug, you should use > them. I feel so sorry to post this st

[Bug c++/85071] New: The g++ delete the memory alloced by new operator before I manually delete it.

2018-03-25 Thread 141242068 at smail dot nju.edu.cn
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The code is too long, but I have tried my best to simplify the codes. Raw code is 14000 lines and now is 218 lines

[Bug c/84900] Compiler report a error unexpectedly.

2018-03-19 Thread 141242068 at smail dot nju.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84900 --- Comment #2 from wierton <141242068 at smail dot nju.edu.cn> --- (In reply to Richard Biener from comment #1) > I belive the code is invalid and using literal 0 instead of test = 0 > shouldn't make it accepted either. clang

[Bug c/84900] New: Compiler report a error unexpectedly.

2018-03-16 Thread 141242068 at smail dot nju.edu.cn
Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Here is my code: $cat main.c struct S2 { int m1; }; int test = 0; int main() { struct S2 *p = &(struct S2) (struct S2) { (test = 0), // gcc re