summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/runnable/testpic.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.test/runnable/testpic.d')
-rw-r--r--gcc/testsuite/gdc.test/runnable/testpic.d19
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/testsuite/gdc.test/runnable/testpic.d b/gcc/testsuite/gdc.test/runnable/testpic.d
index 60f67756a86..ef3ab8667fc 100644
--- a/gcc/testsuite/gdc.test/runnable/testpic.d
+++ b/gcc/testsuite/gdc.test/runnable/testpic.d
@@ -1,4 +1,5 @@
-// PERMUTE_ARGS: -fPIC -O
+// PERMUTE_ARGS: -fPIC -O -fPIE
+// DISABLED: win32 win64
extern (C) int printf(const char*, ...);
@@ -44,10 +45,26 @@ void test17034()
/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=20441
+
+const(char)* moo(const (char) *s)
+{
+ return s;
+}
+
+void test20441()
+{
+ const(char) *x = "abc".ptr;
+ assert( moo(x) - x == 0 );
+}
+
+/***************************************************/
+
int main()
{
test11310();
test17034();
+ test20441();
printf("Success\n");
return 0;