https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113016

            Bug ID: 113016
           Summary: -mtls-dialect=gnu2 conflicts with  -mfdpic but ICEs
                    rather than gives an error
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
            Target: arm-linux-gnueabi

Just a simple testcase like:
```
__thread int t;
int f(void)
{
  return t;
}
```

Compiling with `-mfdpic -mtls-dialect=gnu2 -fPIC -g0` gives an ICE:
```

during RTL pass: expand
<source>: In function 'f':
<source>:5:10: internal compiler error: in legitimize_tls_address, at
config/arm/arm.cc:9358
    5 |   return t;
      |          ^
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
```

Reply via email to