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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-invalid-code         |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-03-20
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |vmakarov at gcc dot gnu.org
   Target Milestone|---                         |6.5
            Summary|internal compiler error: in |[6/7/8 Regression] internal
                   |match_reload, at            |compiler error: in
                   |lra-constraints.c:1068      |match_reload, at
                   |                            |lra-constraints.c:1068
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r192719.
Before that it has been rejected with:
pr84985.c: In function ‘main’:
pr84985.c:3:3: error: ‘asm’ operand has impossible constraints
   asm("" : "=d"(a) : "0"(a), "0ae"(&a));
   ^
Only ICEs with -O0, at -O2 it passes.
ICEs even with int a = 1; instead of just int a;, so there is no uninitialized
use.
int main() {
  int a = 1;
  asm("" : "=d"(a) : "0"(a), "0r"(&a));
}
ICEs too, but "=r" or "=a" instead does not.
I don't see anything invalid on it, unless it is just "0"(a), "0"(&a) which is
of course impossible to reload and is properly diagnosed:
pr84985.c: In function ‘main’:
pr84985.c:3:3: error: inconsistent operand constraints in an ‘asm’
   asm("" : "=d"(a) : "0"(a), "0"(&a));
   ^~~

Reply via email to