diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/other/ptrmem3.C')
-rw-r--r-- | gcc/testsuite/g++.dg/other/ptrmem3.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/ptrmem3.C b/gcc/testsuite/g++.dg/other/ptrmem3.C new file mode 100644 index 000000000..ed6d87574 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/ptrmem3.C @@ -0,0 +1,14 @@ +// Bug: The double cast had an TREE_INT_CST_HIGH of 0, while the single +// cast had -1, so the comparison failed. + +// { dg-do run } + +struct A { }; + +typedef int A::* aip; +typedef long A::* alp; + +int main() +{ + return ((aip)(alp)0 != (aip)0); +} |