[Bug middle-end/106818] code is genereated differently with or without 'extern'

2022-10-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106818 --- Comment #10 from Andrew Pinski --- Created attachment 53745 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53745&action=edit Testcase

[Bug middle-end/106818] code is genereated differently with or without 'extern'

2022-09-05 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106818 --- Comment #9 from Richard Biener --- (In reply to baoshan from comment #5) > Per Andrew's request: > > For GCC built for RISC-V, > With the following code: > struct sss_t { > int i; > int j; > } sss; > extern char array[sizeof(struct

[Bug middle-end/106818] code is genereated differently with or without 'extern'

2022-09-02 Thread palmer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106818 --- Comment #8 from palmer at gcc dot gnu.org --- (In reply to Andrew Pinski from comment #7) > (In reply to baoshan from comment #6) > > > really of unknown alignment then sharing the lui might not work. > > Can you elaborate why shareing the lu

[Bug middle-end/106818] code is genereated differently with or without 'extern'

2022-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106818 --- Comment #7 from Andrew Pinski --- (In reply to baoshan from comment #6) > > really of unknown alignment then sharing the lui might not work. > Can you elaborate why shareing the lui might not work? Linker relaxation not coming in and relaxi

[Bug middle-end/106818] code is genereated differently with or without 'extern'

2022-09-02 Thread pangbw at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106818 --- Comment #6 from baoshan --- > really of unknown alignment then sharing the lui might not work. Can you elaborate why shareing the lui might not work?

[Bug middle-end/106818] code is genereated differently with or without 'extern'

2022-09-02 Thread pangbw at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106818 --- Comment #5 from baoshan --- Per Andrew's request: For GCC built for RISC-V, With the following code: struct sss_t { int i; int j; } sss; extern char array[sizeof(struct sss_t )]; void foo() { struct sss_t *p = (struct sss_t *)ar

[Bug middle-end/106818] code is genereated differently with or without 'extern'

2022-09-02 Thread palmer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106818 palmer at gcc dot gnu.org changed: What|Removed |Added CC||palmer at gcc dot gnu.org --

[Bug middle-end/106818] code is genereated differently with or without 'extern'

2022-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106818 --- Comment #3 from Andrew Pinski --- Please attach or paste the testcase into the bug report instead of a godbolt link too.