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?
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106818
--- Comment #1 from baoshan ---
With 'extern', four 'sb' are ued to store value into "p->i";
while without 'extern', only one 'sw' is used.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106818
Bug ID: 106818
Summary: code is genereated differently with or without
'extern'
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Prior