summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/cast-pretty-print-1.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cast-pretty-print-1.c b/gcc/testsuite/gcc.dg/cast-pretty-print-1.c
new file mode 100644
index 00000000000..e5ecec1a096
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cast-pretty-print-1.c
@@ -0,0 +1,12 @@
+/* Test pretty-printing of casts. Should not depend on whether
+ NOP_EXPR or CONVERT_EXPR is used. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "" } */
+int i;
+void
+f (void)
+{
+ ((unsigned int)i)(); /* { dg-error "error: called object '\\(unsigned int\\)i' is not a function" } */
+ ((char)i)(); /* { dg-error "error: called object '\\(char\\)i' is not a function" } */
+}