diff --git a/rtree-c/src/ReduceC.hs b/rtree-c/src/ReduceC.hs index ea6f00e4d54c0dfe72bbd3723fb1360eec574b4d..7f26a845dd36a2d149529f0b9c12024fdb622bd2 100644 --- a/rtree-c/src/ReduceC.hs +++ b/rtree-c/src/ReduceC.hs @@ -217,8 +217,7 @@ updateCDeclarationSpecifiers sf spec = do fmap concat . forM declrs $ \case decl@(C.CDecl def items l) -> do items' <- fmap catMaybes . forM items $ \item -> do - -- TODO this should be an error. - t' <- state (\case ((_, t) : tps) -> (t, tps); [] -> (Nothing, [])) + t' <- state (\((_, t) : tps) -> (t, tps)) case t' of Just _ -> do -- TODO check for bad struct name here declaration @@ -251,7 +250,6 @@ updateCDerivedDeclarators bt ff dd = do C.CArrDeclr{} -> pure (NonVoid . TPointer $ t, d : dd') C.CFunDeclr params arr ni -> do - -- TODO FIX THIS case params of C.CFunParamsNew params' varadic -> do (tp, params'') <- state (runState (findParams varadic params')) @@ -481,13 +479,13 @@ reduceStructDeclaration = pure (False, x) -- Not declared do somthing Nothing -> do - (ft, fields') <- mapAndUnzipM structField fields split ("remove struct " <> C.identToString sid, C.posOf ni) do modify' (addStruct sid Nothing) mzero do + (ft, catMaybes -> fields') <- mapAndUnzipM (structField sid) fields modify' ( addStruct sid @@ -503,17 +501,31 @@ reduceStructDeclaration = Nothing -> pure (False, x) x -> pure (False, x) where - structField = \case + structField sid = \case C.CDecl spec items ni -> do -- TODO: Currently deletes all struct fields if one of them are deleted. - (bt, spec') <- updateCDeclarationSpecifiers keepAll spec - (fields, items') <- flip mapAndUnzipM items \case - (C.CDeclarationItem (C.CDeclr mid dd Nothing [] ni3) ini ni2) -> do - (nonVoid -> t, dd') <- updateCDerivedDeclarators bt (repeat True) dd - let ft = (fromMaybe (error "all struct fields should be named") mid, Just t) - pure (ft, C.CDeclarationItem (C.CDeclr mid dd' Nothing [] ni3) ini ni2) - a -> notSupportedYet a ni - pure (fields, C.CDecl spec' items' ni) + res <- runMaybeT $ updateCDeclarationSpecifiers keepAll spec + case res of + Just (bt, spec') -> do + (fields, items') <- flip mapAndUnzipM items \case + (C.CDeclarationItem (C.CDeclr mid dd Nothing [] ni3) ini ni2) -> do + let fid = fromMaybe (error "all struct fields should be named") mid + res' <- runMaybeT $ do + (nonVoid -> t, dd') <- updateCDerivedDeclarators bt (repeat True) dd + exceptIf ("remove field " <> C.identToString sid <> "." <> C.identToString fid, C.posOf ni) + pure (t, dd') + case res' of + Nothing -> pure ((fid, Nothing), Nothing) + Just (t, dd') -> pure ((fid, Just t), Just $ C.CDeclarationItem (C.CDeclr mid dd' Nothing [] ni3) ini ni2) + a -> notSupportedYet a ni + case catMaybes items' of + [] -> pure (fields, Nothing) + items'' -> pure (fields, Just (C.CDecl spec' items'' ni)) + Nothing -> + pure + ( map (\i -> (fromMaybe (error "all struct fields should be named") (name i), Nothing)) items + , Nothing + ) a@(C.CStaticAssert{}) -> notSupportedYet' a reduceCDeclarationItem diff --git a/rtree-c/test/expected/clang-22382/reduction/p0.path b/rtree-c/test/expected/clang-22382/reduction/p0.path index 75d296637a6a277f82fa920a52d2e907140c4466..bc8db87acd75d5df623cf1e52e88be1ef3a8b915 100644 --- a/rtree-c/test/expected/clang-22382/reduction/p0.path +++ b/rtree-c/test/expected/clang-22382/reduction/p0.path @@ -1895,6 +1895,10 @@ * reduce to right at ("test/cases/large/clang-22382.c": line 1142) * delete uninitilized variable at ("test/cases/large/clang-22382.c": line 1145) * remove struct S0 at ("test/cases/large/clang-22382.c": line 1147) +* remove field S0.f0 at ("test/cases/large/clang-22382.c": line 1148) +* remove field S0.f1 at ("test/cases/large/clang-22382.c": line 1149) +* remove field S0.f2 at ("test/cases/large/clang-22382.c": line 1150) +* remove field S0.f3 at ("test/cases/large/clang-22382.c": line 1151) * inline variable g_2 at ("test/cases/large/clang-22382.c": line 1154) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) diff --git a/rtree-c/test/expected/clang-22382/reduction/p1.path b/rtree-c/test/expected/clang-22382/reduction/p1.path index e9baf59fe6d90c11404077cc78332a8463a32cf9..eab4cae056ea54522a8f231230f82369155384ec 100644 --- a/rtree-c/test/expected/clang-22382/reduction/p1.path +++ b/rtree-c/test/expected/clang-22382/reduction/p1.path @@ -1889,6 +1889,10 @@ * reduce to right at ("test/cases/large/clang-22382.c": line 1142) * delete uninitilized variable at ("test/cases/large/clang-22382.c": line 1145) * remove struct S0 at ("test/cases/large/clang-22382.c": line 1147) +* remove field S0.f0 at ("test/cases/large/clang-22382.c": line 1148) +* remove field S0.f1 at ("test/cases/large/clang-22382.c": line 1149) +* remove field S0.f2 at ("test/cases/large/clang-22382.c": line 1150) +* remove field S0.f3 at ("test/cases/large/clang-22382.c": line 1151) * inline variable g_2 at ("test/cases/large/clang-22382.c": line 1154) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) diff --git a/rtree-c/test/expected/clang-22382/reduction/p2.path b/rtree-c/test/expected/clang-22382/reduction/p2.path index e32a789190a908cafb386283a90e1cce591d4a21..0f64282b2e443add27554bc7d5ac23596c9cf909 100644 --- a/rtree-c/test/expected/clang-22382/reduction/p2.path +++ b/rtree-c/test/expected/clang-22382/reduction/p2.path @@ -1880,6 +1880,10 @@ * reduce to right at ("test/cases/large/clang-22382.c": line 1142) * delete uninitilized variable at ("test/cases/large/clang-22382.c": line 1145) * remove struct S0 at ("test/cases/large/clang-22382.c": line 1147) +* remove field S0.f0 at ("test/cases/large/clang-22382.c": line 1148) +* remove field S0.f1 at ("test/cases/large/clang-22382.c": line 1149) +* remove field S0.f2 at ("test/cases/large/clang-22382.c": line 1150) +* remove field S0.f3 at ("test/cases/large/clang-22382.c": line 1151) * inline variable g_2 at ("test/cases/large/clang-22382.c": line 1154) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) diff --git a/rtree-c/test/expected/clang-22382/reduction/p3.path b/rtree-c/test/expected/clang-22382/reduction/p3.path index f0a491e9539d84c19cf4be20c4bdd1ffa69ec52c..a415b6457b8e6901f8681849e6c306293fd6d1c3 100644 --- a/rtree-c/test/expected/clang-22382/reduction/p3.path +++ b/rtree-c/test/expected/clang-22382/reduction/p3.path @@ -1867,6 +1867,10 @@ * reduce to right at ("test/cases/large/clang-22382.c": line 1142) * delete uninitilized variable at ("test/cases/large/clang-22382.c": line 1145) * remove struct S0 at ("test/cases/large/clang-22382.c": line 1147) +* remove field S0.f0 at ("test/cases/large/clang-22382.c": line 1148) +* remove field S0.f1 at ("test/cases/large/clang-22382.c": line 1149) +* remove field S0.f2 at ("test/cases/large/clang-22382.c": line 1150) +* remove field S0.f3 at ("test/cases/large/clang-22382.c": line 1151) * inline variable g_2 at ("test/cases/large/clang-22382.c": line 1154) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) diff --git a/rtree-c/test/expected/clang-22382/reduction/p4.path b/rtree-c/test/expected/clang-22382/reduction/p4.path index 4b64c2a1ed7167672767ee6a6b408e78aacac1d8..50bc0a8ba2401b7e97e5316b5312e1c4f8be80cf 100644 --- a/rtree-c/test/expected/clang-22382/reduction/p4.path +++ b/rtree-c/test/expected/clang-22382/reduction/p4.path @@ -1516,6 +1516,10 @@ * reduce to right at ("test/cases/large/clang-22382.c": line 1128) * delete uninitilized variable at ("test/cases/large/clang-22382.c": line 1145) * remove struct S0 at ("test/cases/large/clang-22382.c": line 1147) +* remove field S0.f0 at ("test/cases/large/clang-22382.c": line 1148) +* remove field S0.f1 at ("test/cases/large/clang-22382.c": line 1149) +* remove field S0.f2 at ("test/cases/large/clang-22382.c": line 1150) +* remove field S0.f3 at ("test/cases/large/clang-22382.c": line 1151) * inline variable g_2 at ("test/cases/large/clang-22382.c": line 1154) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) diff --git a/rtree-c/test/expected/clang-22382/reduction/p5.path b/rtree-c/test/expected/clang-22382/reduction/p5.path index e8a6058a0370cd60f5e477d420c7cb5584a37229..0aae8f9a76fba5316241ae061cc804608443e5c9 100644 --- a/rtree-c/test/expected/clang-22382/reduction/p5.path +++ b/rtree-c/test/expected/clang-22382/reduction/p5.path @@ -1100,6 +1100,10 @@ * reduce to right at ("test/cases/large/clang-22382.c": line 1128) * delete uninitilized variable at ("test/cases/large/clang-22382.c": line 1145) * remove struct S0 at ("test/cases/large/clang-22382.c": line 1147) +* remove field S0.f0 at ("test/cases/large/clang-22382.c": line 1148) +* remove field S0.f1 at ("test/cases/large/clang-22382.c": line 1149) +* remove field S0.f2 at ("test/cases/large/clang-22382.c": line 1150) +* remove field S0.f3 at ("test/cases/large/clang-22382.c": line 1151) * inline variable g_2 at ("test/cases/large/clang-22382.c": line 1154) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) diff --git a/rtree-c/test/expected/clang-22382/reduction/p6.path b/rtree-c/test/expected/clang-22382/reduction/p6.path index 5d8cdc4596ef2daf6ae12fc21d2271df2931145d..b199d49906320de0f2be4c46a8129bfd8f3354dd 100644 --- a/rtree-c/test/expected/clang-22382/reduction/p6.path +++ b/rtree-c/test/expected/clang-22382/reduction/p6.path @@ -470,6 +470,10 @@ * reduce to right at ("test/cases/large/clang-22382.c": line 1108) * delete uninitilized variable at ("test/cases/large/clang-22382.c": line 1145) * remove struct S0 at ("test/cases/large/clang-22382.c": line 1147) +* remove field S0.f0 at ("test/cases/large/clang-22382.c": line 1148) +* remove field S0.f1 at ("test/cases/large/clang-22382.c": line 1149) +* remove field S0.f2 at ("test/cases/large/clang-22382.c": line 1150) +* remove field S0.f3 at ("test/cases/large/clang-22382.c": line 1151) * inline variable g_2 at ("test/cases/large/clang-22382.c": line 1154) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) * reduce to operant at ("test/cases/large/clang-22382.c": line 1155) diff --git a/rtree-c/test/expected/clang-23353/reduction/p0.path b/rtree-c/test/expected/clang-23353/reduction/p0.path index 938dce3f488b62891a3ac1fd11e29c16402f9675..454b76847debb72b8591afe30b7cb9a9f71aa428 100644 --- a/rtree-c/test/expected/clang-23353/reduction/p0.path +++ b/rtree-c/test/expected/clang-23353/reduction/p0.path @@ -1889,7 +1889,17 @@ * reduce to right at ("test/cases/large/clang-23353.c": line 1142) * delete uninitilized variable at ("test/cases/large/clang-23353.c": line 1147) * remove struct S0 at ("test/cases/large/clang-23353.c": line 1150) +* remove field S0.f0 at ("test/cases/large/clang-23353.c": line 1151) +* remove field S0.f1 at ("test/cases/large/clang-23353.c": line 1152) +* remove field S0.f2 at ("test/cases/large/clang-23353.c": line 1153) +* remove field S0.f3 at ("test/cases/large/clang-23353.c": line 1154) +* remove field S0.f4 at ("test/cases/large/clang-23353.c": line 1155) +* remove field S0.f5 at ("test/cases/large/clang-23353.c": line 1156) * remove struct S1 at ("test/cases/large/clang-23353.c": line 1159) +* remove field S1.f0 at ("test/cases/large/clang-23353.c": line 1160) +* remove field S1.f1 at ("test/cases/large/clang-23353.c": line 1161) +* remove field S1.f2 at ("test/cases/large/clang-23353.c": line 1162) +* remove field S1.f3 at ("test/cases/large/clang-23353.c": line 1163) * inline variable g_16 at ("test/cases/large/clang-23353.c": line 1167) * inline variable g_25 at ("test/cases/large/clang-23353.c": line 1168) * reduce to operant at ("test/cases/large/clang-23353.c": line 1169) diff --git a/rtree-c/test/expected/clang-23353/reduction/p1.path b/rtree-c/test/expected/clang-23353/reduction/p1.path index fc130e88841040d9ed4ee4db81ab2a276a464459..6b59fa4755a038292e9774ffd2eb2b10a012d837 100644 --- a/rtree-c/test/expected/clang-23353/reduction/p1.path +++ b/rtree-c/test/expected/clang-23353/reduction/p1.path @@ -1887,7 +1887,17 @@ * reduce to right at ("test/cases/large/clang-23353.c": line 1142) * delete uninitilized variable at ("test/cases/large/clang-23353.c": line 1147) * remove struct S0 at ("test/cases/large/clang-23353.c": line 1150) +* remove field S0.f0 at ("test/cases/large/clang-23353.c": line 1151) +* remove field S0.f1 at ("test/cases/large/clang-23353.c": line 1152) +* remove field S0.f2 at ("test/cases/large/clang-23353.c": line 1153) +* remove field S0.f3 at ("test/cases/large/clang-23353.c": line 1154) +* remove field S0.f4 at ("test/cases/large/clang-23353.c": line 1155) +* remove field S0.f5 at ("test/cases/large/clang-23353.c": line 1156) * remove struct S1 at ("test/cases/large/clang-23353.c": line 1159) +* remove field S1.f0 at ("test/cases/large/clang-23353.c": line 1160) +* remove field S1.f1 at ("test/cases/large/clang-23353.c": line 1161) +* remove field S1.f2 at ("test/cases/large/clang-23353.c": line 1162) +* remove field S1.f3 at ("test/cases/large/clang-23353.c": line 1163) * inline variable g_16 at ("test/cases/large/clang-23353.c": line 1167) * inline variable g_25 at ("test/cases/large/clang-23353.c": line 1168) * reduce to operant at ("test/cases/large/clang-23353.c": line 1169) diff --git a/rtree-c/test/expected/clang-23353/reduction/p2.path b/rtree-c/test/expected/clang-23353/reduction/p2.path index 3d60edbf4e6f27bd398065209b5e9a8e2c24263c..9332fee9491150fc580e14e59ac6a7c97774ab33 100644 --- a/rtree-c/test/expected/clang-23353/reduction/p2.path +++ b/rtree-c/test/expected/clang-23353/reduction/p2.path @@ -1882,7 +1882,17 @@ * reduce to right at ("test/cases/large/clang-23353.c": line 1142) * delete uninitilized variable at ("test/cases/large/clang-23353.c": line 1147) * remove struct S0 at ("test/cases/large/clang-23353.c": line 1150) +* remove field S0.f0 at ("test/cases/large/clang-23353.c": line 1151) +* remove field S0.f1 at ("test/cases/large/clang-23353.c": line 1152) +* remove field S0.f2 at ("test/cases/large/clang-23353.c": line 1153) +* remove field S0.f3 at ("test/cases/large/clang-23353.c": line 1154) +* remove field S0.f4 at ("test/cases/large/clang-23353.c": line 1155) +* remove field S0.f5 at ("test/cases/large/clang-23353.c": line 1156) * remove struct S1 at ("test/cases/large/clang-23353.c": line 1159) +* remove field S1.f0 at ("test/cases/large/clang-23353.c": line 1160) +* remove field S1.f1 at ("test/cases/large/clang-23353.c": line 1161) +* remove field S1.f2 at ("test/cases/large/clang-23353.c": line 1162) +* remove field S1.f3 at ("test/cases/large/clang-23353.c": line 1163) * inline variable g_16 at ("test/cases/large/clang-23353.c": line 1167) * inline variable g_25 at ("test/cases/large/clang-23353.c": line 1168) * reduce to operant at ("test/cases/large/clang-23353.c": line 1169) diff --git a/rtree-c/test/expected/clang-23353/reduction/p3.path b/rtree-c/test/expected/clang-23353/reduction/p3.path index d1449014ef4f89d1981591f0b310baf369c650ec..eb0e103895e3c463b3ef2464f883cade82740166 100644 --- a/rtree-c/test/expected/clang-23353/reduction/p3.path +++ b/rtree-c/test/expected/clang-23353/reduction/p3.path @@ -1864,7 +1864,17 @@ * reduce to right at ("test/cases/large/clang-23353.c": line 1142) * delete uninitilized variable at ("test/cases/large/clang-23353.c": line 1147) * remove struct S0 at ("test/cases/large/clang-23353.c": line 1150) +* remove field S0.f0 at ("test/cases/large/clang-23353.c": line 1151) +* remove field S0.f1 at ("test/cases/large/clang-23353.c": line 1152) +* remove field S0.f2 at ("test/cases/large/clang-23353.c": line 1153) +* remove field S0.f3 at ("test/cases/large/clang-23353.c": line 1154) +* remove field S0.f4 at ("test/cases/large/clang-23353.c": line 1155) +* remove field S0.f5 at ("test/cases/large/clang-23353.c": line 1156) * remove struct S1 at ("test/cases/large/clang-23353.c": line 1159) +* remove field S1.f0 at ("test/cases/large/clang-23353.c": line 1160) +* remove field S1.f1 at ("test/cases/large/clang-23353.c": line 1161) +* remove field S1.f2 at ("test/cases/large/clang-23353.c": line 1162) +* remove field S1.f3 at ("test/cases/large/clang-23353.c": line 1163) * inline variable g_16 at ("test/cases/large/clang-23353.c": line 1167) * inline variable g_25 at ("test/cases/large/clang-23353.c": line 1168) * reduce to operant at ("test/cases/large/clang-23353.c": line 1169) diff --git a/rtree-c/test/expected/clang-23353/reduction/p4.path b/rtree-c/test/expected/clang-23353/reduction/p4.path index 2e529dce8b4ac9dfdb425727a89b52d8f0c21683..ebc5ddcfe4edacd52c2be0f4e7770f92bbbeb6e9 100644 --- a/rtree-c/test/expected/clang-23353/reduction/p4.path +++ b/rtree-c/test/expected/clang-23353/reduction/p4.path @@ -1563,7 +1563,17 @@ * reduce to right at ("test/cases/large/clang-23353.c": line 1128) * delete uninitilized variable at ("test/cases/large/clang-23353.c": line 1147) * remove struct S0 at ("test/cases/large/clang-23353.c": line 1150) +* remove field S0.f0 at ("test/cases/large/clang-23353.c": line 1151) +* remove field S0.f1 at ("test/cases/large/clang-23353.c": line 1152) +* remove field S0.f2 at ("test/cases/large/clang-23353.c": line 1153) +* remove field S0.f3 at ("test/cases/large/clang-23353.c": line 1154) +* remove field S0.f4 at ("test/cases/large/clang-23353.c": line 1155) +* remove field S0.f5 at ("test/cases/large/clang-23353.c": line 1156) * remove struct S1 at ("test/cases/large/clang-23353.c": line 1159) +* remove field S1.f0 at ("test/cases/large/clang-23353.c": line 1160) +* remove field S1.f1 at ("test/cases/large/clang-23353.c": line 1161) +* remove field S1.f2 at ("test/cases/large/clang-23353.c": line 1162) +* remove field S1.f3 at ("test/cases/large/clang-23353.c": line 1163) * inline variable g_16 at ("test/cases/large/clang-23353.c": line 1167) * inline variable g_25 at ("test/cases/large/clang-23353.c": line 1168) * reduce to operant at ("test/cases/large/clang-23353.c": line 1169) diff --git a/rtree-c/test/expected/clang-23353/reduction/p5.path b/rtree-c/test/expected/clang-23353/reduction/p5.path index 3de9c8fa1c74460b3e488b89e85dd987a20e18d5..5cdc20c0e5df7abf2f7b1ffad67383f8a0b4d53f 100644 --- a/rtree-c/test/expected/clang-23353/reduction/p5.path +++ b/rtree-c/test/expected/clang-23353/reduction/p5.path @@ -1139,7 +1139,17 @@ * reduce to right at ("test/cases/large/clang-23353.c": line 1128) * delete uninitilized variable at ("test/cases/large/clang-23353.c": line 1147) * remove struct S0 at ("test/cases/large/clang-23353.c": line 1150) +* remove field S0.f0 at ("test/cases/large/clang-23353.c": line 1151) +* remove field S0.f1 at ("test/cases/large/clang-23353.c": line 1152) +* remove field S0.f2 at ("test/cases/large/clang-23353.c": line 1153) +* remove field S0.f3 at ("test/cases/large/clang-23353.c": line 1154) +* remove field S0.f4 at ("test/cases/large/clang-23353.c": line 1155) +* remove field S0.f5 at ("test/cases/large/clang-23353.c": line 1156) * remove struct S1 at ("test/cases/large/clang-23353.c": line 1159) +* remove field S1.f0 at ("test/cases/large/clang-23353.c": line 1160) +* remove field S1.f1 at ("test/cases/large/clang-23353.c": line 1161) +* remove field S1.f2 at ("test/cases/large/clang-23353.c": line 1162) +* remove field S1.f3 at ("test/cases/large/clang-23353.c": line 1163) * inline variable g_16 at ("test/cases/large/clang-23353.c": line 1167) * inline variable g_25 at ("test/cases/large/clang-23353.c": line 1168) * reduce to operant at ("test/cases/large/clang-23353.c": line 1169) diff --git a/rtree-c/test/expected/clang-23353/reduction/p6.path b/rtree-c/test/expected/clang-23353/reduction/p6.path index 4a427667ad7f419b8df41180b18446ac76d44d59..c86ae7fc68ef4fd27f030d17c5b5059eff1ccf0a 100644 --- a/rtree-c/test/expected/clang-23353/reduction/p6.path +++ b/rtree-c/test/expected/clang-23353/reduction/p6.path @@ -505,7 +505,17 @@ * reduce to right at ("test/cases/large/clang-23353.c": line 1108) * delete uninitilized variable at ("test/cases/large/clang-23353.c": line 1147) * remove struct S0 at ("test/cases/large/clang-23353.c": line 1150) +* remove field S0.f0 at ("test/cases/large/clang-23353.c": line 1151) +* remove field S0.f1 at ("test/cases/large/clang-23353.c": line 1152) +* remove field S0.f2 at ("test/cases/large/clang-23353.c": line 1153) +* remove field S0.f3 at ("test/cases/large/clang-23353.c": line 1154) +* remove field S0.f4 at ("test/cases/large/clang-23353.c": line 1155) +* remove field S0.f5 at ("test/cases/large/clang-23353.c": line 1156) * remove struct S1 at ("test/cases/large/clang-23353.c": line 1159) +* remove field S1.f0 at ("test/cases/large/clang-23353.c": line 1160) +* remove field S1.f1 at ("test/cases/large/clang-23353.c": line 1161) +* remove field S1.f2 at ("test/cases/large/clang-23353.c": line 1162) +* remove field S1.f3 at ("test/cases/large/clang-23353.c": line 1163) * inline variable g_16 at ("test/cases/large/clang-23353.c": line 1167) * inline variable g_25 at ("test/cases/large/clang-23353.c": line 1168) * reduce to operant at ("test/cases/large/clang-23353.c": line 1169) diff --git a/rtree-c/test/expected/struct/reduction/r0000.c b/rtree-c/test/expected/struct/reduction/r000000.c similarity index 74% rename from rtree-c/test/expected/struct/reduction/r0000.c rename to rtree-c/test/expected/struct/reduction/r000000.c index fcacfb9f9380bea7716c10f16edb3f7eaabb9666..364ec18a7ee2e41f33d4179f2a93573c0a1f5ab7 100644 --- a/rtree-c/test/expected/struct/reduction/r0000.c +++ b/rtree-c/test/expected/struct/reduction/r000000.c @@ -1,4 +1,6 @@ // 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 0 remove field point.x at ("test/cases/small/struct.c": line 1) +// 0 remove field point.y at ("test/cases/small/struct.c": line 1) // 0 delete variable at ("test/cases/small/struct.c": line 3) // 0 delete uninitilized variable at ("test/cases/small/struct.c": line 6) // 0 remove return statement at ("test/cases/small/struct.c": line 7) diff --git a/rtree-c/test/expected/struct/reduction/r0001.c b/rtree-c/test/expected/struct/reduction/r000001.c similarity index 73% rename from rtree-c/test/expected/struct/reduction/r0001.c rename to rtree-c/test/expected/struct/reduction/r000001.c index 19acb2d495ea1e9f134836447206589292e655d7..041c8d7a2b8865d7b05a2b685d33adcb4e36aafa 100644 --- a/rtree-c/test/expected/struct/reduction/r0001.c +++ b/rtree-c/test/expected/struct/reduction/r000001.c @@ -1,4 +1,6 @@ // 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 0 remove field point.x at ("test/cases/small/struct.c": line 1) +// 0 remove field point.y at ("test/cases/small/struct.c": line 1) // 0 delete variable at ("test/cases/small/struct.c": line 3) // 0 delete uninitilized variable at ("test/cases/small/struct.c": line 6) // 1 remove return statement at ("test/cases/small/struct.c": line 7) diff --git a/rtree-c/test/expected/struct/reduction/r0010.c b/rtree-c/test/expected/struct/reduction/r000010.c similarity index 73% rename from rtree-c/test/expected/struct/reduction/r0010.c rename to rtree-c/test/expected/struct/reduction/r000010.c index 7888c103d05fe427e3f3bb62f16a519a46e79a44..156dda67c19921b81956195e43cf1aef08ebc779 100644 --- a/rtree-c/test/expected/struct/reduction/r0010.c +++ b/rtree-c/test/expected/struct/reduction/r000010.c @@ -1,4 +1,6 @@ // 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 0 remove field point.x at ("test/cases/small/struct.c": line 1) +// 0 remove field point.y at ("test/cases/small/struct.c": line 1) // 0 delete variable at ("test/cases/small/struct.c": line 3) // 1 delete uninitilized variable at ("test/cases/small/struct.c": line 6) // 0 remove return statement at ("test/cases/small/struct.c": line 7) diff --git a/rtree-c/test/expected/struct/reduction/r0011.c b/rtree-c/test/expected/struct/reduction/r000011.c similarity index 72% rename from rtree-c/test/expected/struct/reduction/r0011.c rename to rtree-c/test/expected/struct/reduction/r000011.c index 1cb762269a08d6a2791e413253f038843c3da810..b01e356e5fa143987372a5d785dad224ea606b25 100644 --- a/rtree-c/test/expected/struct/reduction/r0011.c +++ b/rtree-c/test/expected/struct/reduction/r000011.c @@ -1,4 +1,6 @@ // 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 0 remove field point.x at ("test/cases/small/struct.c": line 1) +// 0 remove field point.y at ("test/cases/small/struct.c": line 1) // 0 delete variable at ("test/cases/small/struct.c": line 3) // 1 delete uninitilized variable at ("test/cases/small/struct.c": line 6) // 1 remove return statement at ("test/cases/small/struct.c": line 7) diff --git a/rtree-c/test/expected/struct/reduction/r010.c b/rtree-c/test/expected/struct/reduction/r00010.c similarity index 66% rename from rtree-c/test/expected/struct/reduction/r010.c rename to rtree-c/test/expected/struct/reduction/r00010.c index d1df5491f7c847d3bec39f51cae813696c9cad7d..32cff843614ab2566e359e2fcb43990f7c180013 100644 --- a/rtree-c/test/expected/struct/reduction/r010.c +++ b/rtree-c/test/expected/struct/reduction/r00010.c @@ -1,4 +1,6 @@ // 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 0 remove field point.x at ("test/cases/small/struct.c": line 1) +// 0 remove field point.y at ("test/cases/small/struct.c": line 1) // 1 delete variable at ("test/cases/small/struct.c": line 3) // 0 delete uninitilized variable at ("test/cases/small/struct.c": line 6) diff --git a/rtree-c/test/expected/struct/reduction/r011.c b/rtree-c/test/expected/struct/reduction/r00011.c similarity index 65% rename from rtree-c/test/expected/struct/reduction/r011.c rename to rtree-c/test/expected/struct/reduction/r00011.c index 39ad06b11c0ef6ccaa14428d0fbef11ea447ec61..c945a4527ffe178a3e653c23020667621f499303 100644 --- a/rtree-c/test/expected/struct/reduction/r011.c +++ b/rtree-c/test/expected/struct/reduction/r00011.c @@ -1,4 +1,6 @@ // 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 0 remove field point.x at ("test/cases/small/struct.c": line 1) +// 0 remove field point.y at ("test/cases/small/struct.c": line 1) // 1 delete variable at ("test/cases/small/struct.c": line 3) // 1 delete uninitilized variable at ("test/cases/small/struct.c": line 6) diff --git a/rtree-c/test/expected/struct/reduction/r001000.c b/rtree-c/test/expected/struct/reduction/r001000.c new file mode 100644 index 0000000000000000000000000000000000000000..738b08ede49c89ed67d28ce0df6198c8dc550fb0 --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r001000.c @@ -0,0 +1,16 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 0 remove field point.x at ("test/cases/small/struct.c": line 1) +// 1 remove field point.y at ("test/cases/small/struct.c": line 1) +// 0 delete variable at ("test/cases/small/struct.c": line 3) +// 0 delete uninitilized variable at ("test/cases/small/struct.c": line 6) +// 0 remove return statement at ("test/cases/small/struct.c": line 7) + +struct point { + int x; +}; +struct point p1 = { 0 }; +int main() +{ + struct point p2; + return p1.x; +} diff --git a/rtree-c/test/expected/struct/reduction/r001001.c b/rtree-c/test/expected/struct/reduction/r001001.c new file mode 100644 index 0000000000000000000000000000000000000000..a7d99d59a1ff770b108092bcab302ce749943918 --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r001001.c @@ -0,0 +1,15 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 0 remove field point.x at ("test/cases/small/struct.c": line 1) +// 1 remove field point.y at ("test/cases/small/struct.c": line 1) +// 0 delete variable at ("test/cases/small/struct.c": line 3) +// 0 delete uninitilized variable at ("test/cases/small/struct.c": line 6) +// 1 remove return statement at ("test/cases/small/struct.c": line 7) + +struct point { + int x; +}; +struct point p1 = { 0 }; +int main() +{ + struct point p2; +} diff --git a/rtree-c/test/expected/struct/reduction/r001010.c b/rtree-c/test/expected/struct/reduction/r001010.c new file mode 100644 index 0000000000000000000000000000000000000000..869679d9b0ce3d52bead5077531ccc458d172fde --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r001010.c @@ -0,0 +1,15 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 0 remove field point.x at ("test/cases/small/struct.c": line 1) +// 1 remove field point.y at ("test/cases/small/struct.c": line 1) +// 0 delete variable at ("test/cases/small/struct.c": line 3) +// 1 delete uninitilized variable at ("test/cases/small/struct.c": line 6) +// 0 remove return statement at ("test/cases/small/struct.c": line 7) + +struct point { + int x; +}; +struct point p1 = { 0 }; +int main() +{ + return p1.x; +} diff --git a/rtree-c/test/expected/struct/reduction/r001011.c b/rtree-c/test/expected/struct/reduction/r001011.c new file mode 100644 index 0000000000000000000000000000000000000000..84bf34e76e87b752fdfb113f6a31885ba1922823 --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r001011.c @@ -0,0 +1,14 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 0 remove field point.x at ("test/cases/small/struct.c": line 1) +// 1 remove field point.y at ("test/cases/small/struct.c": line 1) +// 0 delete variable at ("test/cases/small/struct.c": line 3) +// 1 delete uninitilized variable at ("test/cases/small/struct.c": line 6) +// 1 remove return statement at ("test/cases/small/struct.c": line 7) + +struct point { + int x; +}; +struct point p1 = { 0 }; +int main() +{ +} diff --git a/rtree-c/test/expected/struct/reduction/r00110.c b/rtree-c/test/expected/struct/reduction/r00110.c new file mode 100644 index 0000000000000000000000000000000000000000..4f0896d203dcb64f21a5f49d0df8262aa8a59e3e --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r00110.c @@ -0,0 +1,13 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 0 remove field point.x at ("test/cases/small/struct.c": line 1) +// 1 remove field point.y at ("test/cases/small/struct.c": line 1) +// 1 delete variable at ("test/cases/small/struct.c": line 3) +// 0 delete uninitilized variable at ("test/cases/small/struct.c": line 6) + +struct point { + int x; +}; +int main() +{ + struct point p2; +} diff --git a/rtree-c/test/expected/struct/reduction/r00111.c b/rtree-c/test/expected/struct/reduction/r00111.c new file mode 100644 index 0000000000000000000000000000000000000000..e2a14c46afb7e195bc14cb06d47fbb3b91ae6568 --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r00111.c @@ -0,0 +1,12 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 0 remove field point.x at ("test/cases/small/struct.c": line 1) +// 1 remove field point.y at ("test/cases/small/struct.c": line 1) +// 1 delete variable at ("test/cases/small/struct.c": line 3) +// 1 delete uninitilized variable at ("test/cases/small/struct.c": line 6) + +struct point { + int x; +}; +int main() +{ +} diff --git a/rtree-c/test/expected/struct/reduction/r01000.c b/rtree-c/test/expected/struct/reduction/r01000.c new file mode 100644 index 0000000000000000000000000000000000000000..ffb073ccbcdffbd3a38be23a216c3158a7f46e17 --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r01000.c @@ -0,0 +1,12 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 1 remove field point.x at ("test/cases/small/struct.c": line 1) +// 0 remove field point.y at ("test/cases/small/struct.c": line 1) +// 0 delete variable at ("test/cases/small/struct.c": line 3) +// 0 delete uninitilized variable at ("test/cases/small/struct.c": line 6) + +struct point { }; +struct point p1 = { 0 }; +int main() +{ + struct point p2; +} diff --git a/rtree-c/test/expected/struct/reduction/r01001.c b/rtree-c/test/expected/struct/reduction/r01001.c new file mode 100644 index 0000000000000000000000000000000000000000..1d528f08650bec1d4d6af5549e19d053ffc41521 --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r01001.c @@ -0,0 +1,11 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 1 remove field point.x at ("test/cases/small/struct.c": line 1) +// 0 remove field point.y at ("test/cases/small/struct.c": line 1) +// 0 delete variable at ("test/cases/small/struct.c": line 3) +// 1 delete uninitilized variable at ("test/cases/small/struct.c": line 6) + +struct point { }; +struct point p1 = { 0 }; +int main() +{ +} diff --git a/rtree-c/test/expected/struct/reduction/r01010.c b/rtree-c/test/expected/struct/reduction/r01010.c new file mode 100644 index 0000000000000000000000000000000000000000..d374378973146ba20edf745e096acdd8e2410560 --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r01010.c @@ -0,0 +1,11 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 1 remove field point.x at ("test/cases/small/struct.c": line 1) +// 0 remove field point.y at ("test/cases/small/struct.c": line 1) +// 1 delete variable at ("test/cases/small/struct.c": line 3) +// 0 delete uninitilized variable at ("test/cases/small/struct.c": line 6) + +struct point { }; +int main() +{ + struct point p2; +} diff --git a/rtree-c/test/expected/struct/reduction/r01011.c b/rtree-c/test/expected/struct/reduction/r01011.c new file mode 100644 index 0000000000000000000000000000000000000000..dcdcff0a4e6794c6b13e42643963a28845cb7412 --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r01011.c @@ -0,0 +1,10 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 1 remove field point.x at ("test/cases/small/struct.c": line 1) +// 0 remove field point.y at ("test/cases/small/struct.c": line 1) +// 1 delete variable at ("test/cases/small/struct.c": line 3) +// 1 delete uninitilized variable at ("test/cases/small/struct.c": line 6) + +struct point { }; +int main() +{ +} diff --git a/rtree-c/test/expected/struct/reduction/r01100.c b/rtree-c/test/expected/struct/reduction/r01100.c new file mode 100644 index 0000000000000000000000000000000000000000..32609011789231607265d3f44cc78783a35d40a9 --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r01100.c @@ -0,0 +1,12 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 1 remove field point.x at ("test/cases/small/struct.c": line 1) +// 1 remove field point.y at ("test/cases/small/struct.c": line 1) +// 0 delete variable at ("test/cases/small/struct.c": line 3) +// 0 delete uninitilized variable at ("test/cases/small/struct.c": line 6) + +struct point { }; +struct point p1 = { }; +int main() +{ + struct point p2; +} diff --git a/rtree-c/test/expected/struct/reduction/r01101.c b/rtree-c/test/expected/struct/reduction/r01101.c new file mode 100644 index 0000000000000000000000000000000000000000..0099d982eede950e53c1fc62a15100e0d5a09a8a --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r01101.c @@ -0,0 +1,11 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 1 remove field point.x at ("test/cases/small/struct.c": line 1) +// 1 remove field point.y at ("test/cases/small/struct.c": line 1) +// 0 delete variable at ("test/cases/small/struct.c": line 3) +// 1 delete uninitilized variable at ("test/cases/small/struct.c": line 6) + +struct point { }; +struct point p1 = { }; +int main() +{ +} diff --git a/rtree-c/test/expected/struct/reduction/r01110.c b/rtree-c/test/expected/struct/reduction/r01110.c new file mode 100644 index 0000000000000000000000000000000000000000..90e1373befe0fa4cd02fca25a472ab5d08c1e3be --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r01110.c @@ -0,0 +1,11 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 1 remove field point.x at ("test/cases/small/struct.c": line 1) +// 1 remove field point.y at ("test/cases/small/struct.c": line 1) +// 1 delete variable at ("test/cases/small/struct.c": line 3) +// 0 delete uninitilized variable at ("test/cases/small/struct.c": line 6) + +struct point { }; +int main() +{ + struct point p2; +} diff --git a/rtree-c/test/expected/struct/reduction/r01111.c b/rtree-c/test/expected/struct/reduction/r01111.c new file mode 100644 index 0000000000000000000000000000000000000000..cab20b8bf17e23b9e3b4862c6049f6218144986b --- /dev/null +++ b/rtree-c/test/expected/struct/reduction/r01111.c @@ -0,0 +1,10 @@ +// 0 remove struct point at ("test/cases/small/struct.c": line 1) +// 1 remove field point.x at ("test/cases/small/struct.c": line 1) +// 1 remove field point.y at ("test/cases/small/struct.c": line 1) +// 1 delete variable at ("test/cases/small/struct.c": line 3) +// 1 delete uninitilized variable at ("test/cases/small/struct.c": line 6) + +struct point { }; +int main() +{ +} diff --git a/rtree-c/test/expected/typedefstruct/reduction/r000.c b/rtree-c/test/expected/typedefstruct/reduction/r00000.c similarity index 69% rename from rtree-c/test/expected/typedefstruct/reduction/r000.c rename to rtree-c/test/expected/typedefstruct/reduction/r00000.c index 24f99c32bfbd634349d169ae5a2f776ce3cc933c..41951b944056b76924143da0a940ec6783fec714 100644 --- a/rtree-c/test/expected/typedefstruct/reduction/r000.c +++ b/rtree-c/test/expected/typedefstruct/reduction/r00000.c @@ -1,4 +1,6 @@ // 0 remove struct point at ("test/cases/small/typedefstruct.c": line 1) +// 0 remove field point.x at ("test/cases/small/typedefstruct.c": line 2) +// 0 remove field point.y at ("test/cases/small/typedefstruct.c": line 3) // 0 delete variable at ("test/cases/small/typedefstruct.c": line 7) // 0 remove return statement at ("test/cases/small/typedefstruct.c": line 8) diff --git a/rtree-c/test/expected/typedefstruct/reduction/r001.c b/rtree-c/test/expected/typedefstruct/reduction/r00001.c similarity index 68% rename from rtree-c/test/expected/typedefstruct/reduction/r001.c rename to rtree-c/test/expected/typedefstruct/reduction/r00001.c index b48882b6037952ed6ce2b3c1e6bbb2dfa6ccba8c..3de3382ce365c2036c56b17e8103bcf1c64c2a49 100644 --- a/rtree-c/test/expected/typedefstruct/reduction/r001.c +++ b/rtree-c/test/expected/typedefstruct/reduction/r00001.c @@ -1,4 +1,6 @@ // 0 remove struct point at ("test/cases/small/typedefstruct.c": line 1) +// 0 remove field point.x at ("test/cases/small/typedefstruct.c": line 2) +// 0 remove field point.y at ("test/cases/small/typedefstruct.c": line 3) // 0 delete variable at ("test/cases/small/typedefstruct.c": line 7) // 1 remove return statement at ("test/cases/small/typedefstruct.c": line 8) diff --git a/rtree-c/test/expected/typedefstruct/reduction/r01.c b/rtree-c/test/expected/typedefstruct/reduction/r0001.c similarity index 60% rename from rtree-c/test/expected/typedefstruct/reduction/r01.c rename to rtree-c/test/expected/typedefstruct/reduction/r0001.c index 91afd1f73f52593bac08639fc18d12d2bdb87eb8..9fd284f2c3ef81f36668bcd977547bc37072f8a3 100644 --- a/rtree-c/test/expected/typedefstruct/reduction/r01.c +++ b/rtree-c/test/expected/typedefstruct/reduction/r0001.c @@ -1,4 +1,6 @@ // 0 remove struct point at ("test/cases/small/typedefstruct.c": line 1) +// 0 remove field point.x at ("test/cases/small/typedefstruct.c": line 2) +// 0 remove field point.y at ("test/cases/small/typedefstruct.c": line 3) // 1 delete variable at ("test/cases/small/typedefstruct.c": line 7) typedef struct point { diff --git a/rtree-c/test/expected/typedefstruct/reduction/r00100.c b/rtree-c/test/expected/typedefstruct/reduction/r00100.c new file mode 100644 index 0000000000000000000000000000000000000000..90f8f1bb25baef7f2f84001fc40d915337fd764d --- /dev/null +++ b/rtree-c/test/expected/typedefstruct/reduction/r00100.c @@ -0,0 +1,14 @@ +// 0 remove struct point at ("test/cases/small/typedefstruct.c": line 1) +// 0 remove field point.x at ("test/cases/small/typedefstruct.c": line 2) +// 1 remove field point.y at ("test/cases/small/typedefstruct.c": line 3) +// 0 delete variable at ("test/cases/small/typedefstruct.c": line 7) +// 0 remove return statement at ("test/cases/small/typedefstruct.c": line 8) + +typedef struct point { + int x; + } point; +int main(void) +{ + point p = { 0 }; + return p.x; +} diff --git a/rtree-c/test/expected/typedefstruct/reduction/r00101.c b/rtree-c/test/expected/typedefstruct/reduction/r00101.c new file mode 100644 index 0000000000000000000000000000000000000000..644a8b5817ff56f28b9c4a83aaff4a72429d4923 --- /dev/null +++ b/rtree-c/test/expected/typedefstruct/reduction/r00101.c @@ -0,0 +1,13 @@ +// 0 remove struct point at ("test/cases/small/typedefstruct.c": line 1) +// 0 remove field point.x at ("test/cases/small/typedefstruct.c": line 2) +// 1 remove field point.y at ("test/cases/small/typedefstruct.c": line 3) +// 0 delete variable at ("test/cases/small/typedefstruct.c": line 7) +// 1 remove return statement at ("test/cases/small/typedefstruct.c": line 8) + +typedef struct point { + int x; + } point; +int main(void) +{ + point p = { 0 }; +} diff --git a/rtree-c/test/expected/typedefstruct/reduction/r0011.c b/rtree-c/test/expected/typedefstruct/reduction/r0011.c new file mode 100644 index 0000000000000000000000000000000000000000..5d5594b3128b6327923631c5fd0a486238d1bc3f --- /dev/null +++ b/rtree-c/test/expected/typedefstruct/reduction/r0011.c @@ -0,0 +1,11 @@ +// 0 remove struct point at ("test/cases/small/typedefstruct.c": line 1) +// 0 remove field point.x at ("test/cases/small/typedefstruct.c": line 2) +// 1 remove field point.y at ("test/cases/small/typedefstruct.c": line 3) +// 1 delete variable at ("test/cases/small/typedefstruct.c": line 7) + +typedef struct point { + int x; + } point; +int main(void) +{ +} diff --git a/rtree-c/test/expected/typedefstruct/reduction/r0100.c b/rtree-c/test/expected/typedefstruct/reduction/r0100.c new file mode 100644 index 0000000000000000000000000000000000000000..dcb66c00043c347b9b61d5832c73ef9bfbbca20f --- /dev/null +++ b/rtree-c/test/expected/typedefstruct/reduction/r0100.c @@ -0,0 +1,10 @@ +// 0 remove struct point at ("test/cases/small/typedefstruct.c": line 1) +// 1 remove field point.x at ("test/cases/small/typedefstruct.c": line 2) +// 0 remove field point.y at ("test/cases/small/typedefstruct.c": line 3) +// 0 delete variable at ("test/cases/small/typedefstruct.c": line 7) + +typedef struct point { } point; +int main(void) +{ + point p = { 0 }; +} diff --git a/rtree-c/test/expected/typedefstruct/reduction/r0101.c b/rtree-c/test/expected/typedefstruct/reduction/r0101.c new file mode 100644 index 0000000000000000000000000000000000000000..669fb2e88b56e40871fde0f90f25876e02212b34 --- /dev/null +++ b/rtree-c/test/expected/typedefstruct/reduction/r0101.c @@ -0,0 +1,9 @@ +// 0 remove struct point at ("test/cases/small/typedefstruct.c": line 1) +// 1 remove field point.x at ("test/cases/small/typedefstruct.c": line 2) +// 0 remove field point.y at ("test/cases/small/typedefstruct.c": line 3) +// 1 delete variable at ("test/cases/small/typedefstruct.c": line 7) + +typedef struct point { } point; +int main(void) +{ +} diff --git a/rtree-c/test/expected/typedefstruct/reduction/r0110.c b/rtree-c/test/expected/typedefstruct/reduction/r0110.c new file mode 100644 index 0000000000000000000000000000000000000000..b6db6c8ec57c16efafbf6a387690c2d21c449563 --- /dev/null +++ b/rtree-c/test/expected/typedefstruct/reduction/r0110.c @@ -0,0 +1,10 @@ +// 0 remove struct point at ("test/cases/small/typedefstruct.c": line 1) +// 1 remove field point.x at ("test/cases/small/typedefstruct.c": line 2) +// 1 remove field point.y at ("test/cases/small/typedefstruct.c": line 3) +// 0 delete variable at ("test/cases/small/typedefstruct.c": line 7) + +typedef struct point { } point; +int main(void) +{ + point p = { }; +} diff --git a/rtree-c/test/expected/typedefstruct/reduction/r0111.c b/rtree-c/test/expected/typedefstruct/reduction/r0111.c new file mode 100644 index 0000000000000000000000000000000000000000..89d4f1d27fa3fe73fdde7606f611b7964075544a --- /dev/null +++ b/rtree-c/test/expected/typedefstruct/reduction/r0111.c @@ -0,0 +1,9 @@ +// 0 remove struct point at ("test/cases/small/typedefstruct.c": line 1) +// 1 remove field point.x at ("test/cases/small/typedefstruct.c": line 2) +// 1 remove field point.y at ("test/cases/small/typedefstruct.c": line 3) +// 1 delete variable at ("test/cases/small/typedefstruct.c": line 7) + +typedef struct point { } point; +int main(void) +{ +}