aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr118376.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr118376.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr118376.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr118376.c b/gcc/testsuite/gcc.dg/pr118376.c
new file mode 100644
index 0000000..16b2f54
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr118376.c
@@ -0,0 +1,11 @@
+/* PR c/118376 */
+/* { dg-do compile } */
+/* { dg-options "-Wsign-conversion" } */
+
+unsigned x;
+
+void
+foo ()
+{
+ __builtin_memset (&x, (long long) __builtin_stdc_rotate_right (x, 0), 1);
+} /* { dg-warning "conversion to 'int' from 'long long int' may change the sign of the result" "" { target *-*-* } .-1 } */