gcc/testsuite/g++.dg/ext/asm3.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | // Copyright (C) 2002 Free Software Foundation, Inc. |
| 4 | // Contributed by Nathan Sidwell 16 Sep 2002 <[email protected]> |
| 5 | |
| 6 | // PR 7015. ICE with asms |
| 7 | |
| 8 | int two(int in) |
| 9 | { |
| 10 | #if __cplusplus <= 201402L |
| 11 | register |
| 12 | #endif |
| 13 | int out; |
| 14 | __asm__ ("" : "r" (out) : "r" (in)); |
| 15 | return out; |
| 16 | } |
| 17 | |
| 18 | // { dg-message "error:" "" { target *-*-* } 14 } |