diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/ptr-conv-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/ptr-conv-1.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/ptr-conv-1.c b/gcc/testsuite/gcc.c-torture/compile/ptr-conv-1.c new file mode 100644 index 000000000..11dc8ce89 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/ptr-conv-1.c @@ -0,0 +1,11 @@ +/* The intermediate conversion to __PTRDIFF_TYPE__ could be lost, + resulting in an "invalid types in nop conversion" ICE. */ +long long a; +void +f (void) +{ + int c = 1; + volatile int *p = &c; + a = (long long) (__PTRDIFF_TYPE__) p; + *p; +} |