summaryrefslogtreecommitdiffhomepage
path: root/64x0/cc2/regression-tests/pure2-deducing-pointers-error.cpp2
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-09 21:47:33 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-09 21:47:33 +0100
commit9cef856478cebe4bfe00e1d39c9e2d49015dd0e4 (patch)
treef04c6b6b1156057748c7044a766120485c45c885 /64x0/cc2/regression-tests/pure2-deducing-pointers-error.cpp2
parenta8a55bc93e06cd8f75f7d397c013f7a312ea29a4 (diff)
MP-UX/hCore Assembler for 64x0, Release I.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to '64x0/cc2/regression-tests/pure2-deducing-pointers-error.cpp2')
-rw-r--r--64x0/cc2/regression-tests/pure2-deducing-pointers-error.cpp247
1 files changed, 0 insertions, 47 deletions
diff --git a/64x0/cc2/regression-tests/pure2-deducing-pointers-error.cpp2 b/64x0/cc2/regression-tests/pure2-deducing-pointers-error.cpp2
deleted file mode 100644
index ee6e5ff..0000000
--- a/64x0/cc2/regression-tests/pure2-deducing-pointers-error.cpp2
+++ /dev/null
@@ -1,47 +0,0 @@
-fun: (inout i:int) -> *int = {
- return i&;
-}
-
-fun2: (inout i:int) -> (result : *int) = {
- result = i&;
-}
-
-main: () -> int = {
- a: int = 2;
- pa: *int = a&;
- ppa: **int = pa&;
-
- pa = 0; // caught
-
- pa2:= ppa*;
- pa2 = 0; // caught
-
- pa3 := a&;
- pa3 = 0; // caught
- pa3 += 2; // caught
-
- ppa2 := pa2&;
- pa4 := ppa2*;
- pa4 = 0; // caught
-
- pppa := ppa&;
- pa5 := pppa**;
- pa5 = 0; // caught
-
- // TODO: @filipsajdak please take a look
- // The bugfix in get_declaration_of(t) to add `&& ri->position() <= t.position()`
- // to the condition is correct; it fixes issue #669 by not looking past the first
- // declaration of the name in t. However, that change made the following two
- // "caught" cases no longer be caught.
- fun(a)++; // caught
- fp := fun(a);
- fp = 0; // caught
-
- f := fun(a)*;
- _ = f;
-
- fp2 := fun2(a).result;
- fp2--; // not caught :(
-
- return a * pa* * ppa**; // 8
-}