[Bug middle-end/109484] [Wrong Code][inline-asm] output operands overlap with output

2023-04-12 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109484 --- Comment #6 from 。 <570070308 at qq dot com> --- A better testcase: ```c void kkk(void **const pp) { void *temp; __asm__ volatile ( "movq $0xff, %0\n\t" "movq $0xff, %1"

[Bug middle-end/109484] [Wrong Code][inline-asm] output operands overlap with output

2023-04-12 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109484 --- Comment #5 from 。 <570070308 at qq dot com> --- (In reply to Richard Biener from comment #3) > (In reply to 。 from comment #2) > > (In reply to Richard Biener from comment #1) > > > but you clobber 'temp'

[Bug middle-end/109484] [Wrong Code][inline-asm] output operands overlap with output

2023-04-12 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109484 --- Comment #2 from 。 <570070308 at qq dot com> --- (In reply to Richard Biener from comment #1) > but you clobber 'temp' early and fail to indicate that so GCC allocates the > same register as part of the "+m&quo

[Bug middle-end/109484] New: [Wrong Code][inline-asm] output operands overlap with output

2023-04-12 Thread 570070308 at qq dot com via Gcc-bugs
Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- For code: ```c void kkk(void **const pp) { void *temp; __asm__ volatile ( "movq %1, %0\n\t"

[Bug middle-end/108441] [12.2] Maybe missed optimization: loading an 16-bit integer value from .rodata instead of an immediate store

2023-01-18 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108441 --- Comment #1 from 。 <570070308 at qq dot com> --- When compiling with `-fno-tree-slp-vectorize`, it seems to be better: ``` kkk: movl$16, %eax movw%ax, ldap(%rip) ret ```

[Bug middle-end/108441] New: [12.2] Maybe missed optimization: loading an 16-bit integer value from .rodata instead of an immediate store

2023-01-18 Thread 570070308 at qq dot com via Gcc-bugs
: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- For the C code: ```c #include extern struct __attribute__

[Bug target/81036] -fcall-saved-X does not work for floating-point registers

2022-11-05 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81036 --- Comment #2 from 。 <570070308 at qq dot com> --- gcc 12.2 -fcall-saved-xmm0 not work too, target and host is x86-64.

[Bug web/107494] New: -ffinite-loops is not enable by default

2022-11-01 Thread 570070308 at qq dot com via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- According to https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html ``` -ffinite-loops Assume that a loop with an exit will eventually take the exit and not loop indefinitely

[Bug c/105510] error: initializer element is not constant

2022-05-09 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105510 --- Comment #2 from 。 <570070308 at qq dot com> --- (In reply to Richard Biener from comment #1) > As a workaround it works with > > struct Test t=(struct Test){1, {3, 4}}; > > I don't think it your way of writin

[Bug c/105510] New: [12] error: initializer element is not constant

2022-05-06 Thread 570070308 at qq dot com via Gcc-bugs
: c Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- clang can success compile it but gcc can't. MSVC can't too, I'm not sure this is a bug. test.c ``` struct Test2 { long int x; long int y; }; struct Test {

[Bug middle-end/105342] [Extended Asm]Memory barrier geater than a function call

2022-04-21 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105342 --- Comment #4 from 。 <570070308 at qq dot com> --- (In reply to Richard Biener from comment #1) > Is it really important though? The doc says that "The asm statement allows you to include assembly instructions directly within C

[Bug middle-end/105342] New: [Extended Asm]Memory barrier geater than a function call

2022-04-21 Thread 570070308 at qq dot com via Gcc-bugs
Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- This is an enhancement request, not a bug. According to doc, using the "memory" clobber effectively forms a read/write memory b

[Bug c/105311] New: [12]Still generate memset even with -fno-tree-loop-distribute-patterns

2022-04-19 Thread 570070308 at qq dot com via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- I have read the https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888 , according to this, adding `-fno-tree-loop-distribute-patterns

[Bug middle-end/104763] [12 Regression] Generate wrong assembly code

2022-03-07 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104763 --- Comment #8 from 。 <570070308 at qq dot com> --- (In reply to Richard Biener from comment #7) > Note that the case of an endless loop is somewhat special since the store > is dead there since there is no way to reach a load fro

[Bug c/104805] [12.0] x86_64 Extended asm may use rbp register to input/output even thougth "rbp" is in the clobber list when "rsp" and "rbp" are both in the in the clobber list

2022-03-06 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104805 --- Comment #5 from 。 <570070308 at qq dot com> --- (In reply to Jakub Jelinek from comment #4) > rbp is hard frame pointer, so depending on whether the function needs a > frame pointer (at -O0 I think all functions do), the re

[Bug c/104805] [12.0] x86_64 Extended asm may use rbp register to input/output even thougth "rbp" is in the clobber list when "rsp" and "rbp" are both in the in the clobber list

2022-03-06 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104805 --- Comment #3 from 。 <570070308 at qq dot com> --- (In reply to Jakub Jelinek from comment #1) > Clobber of "rsp" makes no sense, you can't change the value of the stack > pointer in inline asm without restoring it ba

[Bug c/104804] [12.0] x86_64 Extended asm always failed with "+&m" in Output Operands and wrong error info

2022-03-06 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104804 --- Comment #4 from 。 <570070308 at qq dot com> --- (In reply to Jakub Jelinek from comment #3) > What exactly are you trying to achieve (because & on your testcase makes no > sense at all, the other input is "r" and

[Bug c/104805] [12.0] x86_64 Extended asm may use rbp register to input/output even thougth "rbp" is in the clobber list when "rsp" and "rbp" are both in the in the clobber list

2022-03-06 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104805 --- Comment #2 from 。 <570070308 at qq dot com> --- (In reply to Jakub Jelinek from comment #1) > Clobber of "rsp" makes no sense, you can't change the value of the stack > pointer in inline asm without restoring it ba

[Bug c/104805] New: [12.0] x86_64 Extended asm may use rbp register to input/output even thougth "rbp" is in the clobber list when "rsp" and "rbp" are both in the in the clobber list

2022-03-06 Thread 570070308 at qq dot com via Gcc-bugs
are both in the in the clobber list Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at

[Bug c/104804] [12.0] x86_64 Extended asm always failed with "+&m" in Output Operands and wrong error info

2022-03-06 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104804 --- Comment #2 from 。 <570070308 at qq dot com> --- (In reply to Jakub Jelinek from comment #1) > +m is handled as =m with corresponding m, early clobber for that doesn't > make sense, on one side you require that the input i

[Bug c/104804] New: [12.0] x86_64 Extended asm always failed with "+=m" in Output Operands and wrong error info

2022-03-06 Thread 570070308 at qq dot com via Gcc-bugs
NCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- When using "+&m" in the Output Operands, the compile will always failed, however, the &qu

[Bug c/104786] [12.0]internal compiler error with extern asm

2022-03-04 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104786 --- Comment #1 from 。 <570070308 at qq dot com> --- gcc-9 crashed too

[Bug c/104786] New: [12.0]internal compiler error with extern asm

2022-03-04 Thread 570070308 at qq dot com via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- Created attachment 52565 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52565&action=edit /tmp/ccusgsXN.out log: ``` ig@ig-virtual-machine:~/temp$ gcc-12 test5.c -S

[Bug middle-end/104763] [12.0] Generate wrong assembly code

2022-03-02 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104763 --- Comment #3 from 。 <570070308 at qq dot com> --- (In reply to Jakub Jelinek from comment #2) > Can't reproduce with -O2, with -O1 there are 2 stores instead of 3 > before the endless loop start

[Bug c/104763] [12.0] Generate wrong assembly code

2022-03-02 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104763 --- Comment #1 from 。 <570070308 at qq dot com> --- change `*i=0x0700070007000700;` to `*(volatile size_t *)i=0x0700070007000700;` will fix it. This is my mistake

[Bug c/104763] New: [12.0] Generate wrong assembly code

2022-03-02 Thread 570070308 at qq dot com via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- file test.c: ``` #include #include #include void move_up() { for ( size_t* i=(size_t *)(0xb8000+160*24); ; ) { *i=0x0700070007000700; //if ( i == (size_t

[Bug c++/98261] Wrong optimize for virtual function

2020-12-13 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98261 --- Comment #3 from 。 <570070308 at qq dot com> --- (In reply to Jonathan Wakely from comment #2) > The bug reporting guidelines tell you to try -fsanitize=undefined before > reporting a bug. That would have told you your code is w

[Bug c++/98261] New: Wrong optimize for virtual function

2020-12-13 Thread 570070308 at qq dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- In ``` #include #include class A { public: virtual void print() { printf("A\n"); } }; class B { public: virtual

[Bug libstdc++/98233] New: A small bug in stl

2020-12-10 Thread 570070308 at qq dot com via Gcc-bugs
: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- In the code ``` #include #include struct A { public: int a; std::vector m; }; int main() { A x; x.m.emplace_back(); x.a=13; x.m[0].a=9; printf("%d\n",x.m[0].a);

[Bug c/96317] New: [8/9/10/11] Int compare optimizations make some errors

2020-07-25 Thread 570070308 at qq dot com
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- for the code: signed int a=2147483647; if( (signed int)( (signed int)a + (signed int)1 ) < (signed int)2147483647 ) { printf("111\n");

[Bug libstdc++/96240] New: Error in building gcc-11 with --disable-shared

2020-07-19 Thread 570070308 at qq dot com
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- Created attachment 48892 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48892&action=edit The full log file Successfully build gcc-11-20200705 and gcc-11-2

[Bug c++/95911] New: [8/9/10/11] returning && makes an error without any warning

2020-06-26 Thread 570070308 at qq dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: 570070308 at qq dot com Target Milestone: --- Created attachment 48789 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48789&action=edit the .ii file class A

[Bug go/95876] New: Error in compiling gcc-11-20200621 with gcc-10 without -g

2020-06-24 Thread 570070308 at qq dot com
Priority: P3 Component: go Assignee: ian at airs dot com Reporter: 570070308 at qq dot com CC: cmang at google dot com Target Milestone: --- Created attachment 48781 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48781&action=edit fullscreenlo