source: tests/array-container/.expect/dimexpr-match-cfa.txt @ ffac259

Last change on this file since ffac259 was f02f546, checked in by Michael Brooks <mlbrooks@…>, 17 months ago

Implement new rules for array dimension expression matching.

Core changes:
src/ResolvExpr/Unify.cc: add sense of "these two expressions unify"
src/InitTweak/GenInit.cc: make hoisting happen more often
tests/array-container/*: reconfigure the array-dimension test to use non-"classic" expectation rules

Misc contributors and noise:
libcfa/src/parseargs.cfa: ,ake a parameter, that's used as a length expression, constant (example of an array user following new rules)
src/ResolvExpr/ResolveTypeof.h: make fixArrayType public
src/Validate/GenericParameter.cpp: do the array-type desugaring in both AST corners that forall-variables can be found (not just in one of them)
tests/.expect/typedefRedef-ERR1.txt: old one was "expecting" a bug, that new array rules handle correctly

  • Property mode set to 100644
File size: 7.9 KB
RevLine 
[0f4ac10]1---- PTRPARM_CALL:   { void f( typeof( mkar_( ((tag(float)){}) , ((tag(__L__)){}) ) ) * x ) {} typeof( mkar_( ((tag(float)){}) , ((tag(__R__)){}) ) ) a; f( & a ); }
2done STA EQ STA, L=7, R=7
[f02f546]3skip STA NE STA, L=7, R=42
[0f4ac10]4done STA EQ STA, L=7, R=enu7
[f02f546]5skip STA NE STA, L=7, R=enu42
[0f4ac10]6skip STA NE DYN, L=7, R=cpr42
7skip STA NE UNS, L=7, R=mut42
8done STA EQ STA, L=enu7, R=enu7
[f02f546]9skip STA NE STA, L=enu7, R=enu42
[0f4ac10]10done STA EQ STA, L=enu7, R=7
[f02f546]11skip STA NE STA, L=enu7, R=42
[0f4ac10]12skip STA NE DYN, L=enu7, R=cpr42
13skip STA NE UNS, L=enu7, R=mut42
14done DYN EQ DYN, L=cpr7, R=cpr7
[f02f546]15skip DYN NE DYN, L=cpr7, R=cpr42
[0f4ac10]16skip DYN NE STA, L=cpr7, R=42
17skip DYN NE STA, L=cpr7, R=enu42
[f02f546]18skip DYN NE UNS, L=cpr7, R=mut42
19skip UNS EQ UNS, L=mut7, R=mut7
20skip UNS NE UNS, L=mut7, R=mut42
[0f4ac10]21skip UNS NE STA, L=mut7, R=42
22skip UNS NE STA, L=mut7, R=enu42
[f02f546]23skip UNS NE DYN, L=mut7, R=cpr42
24skip STA NE DYN, L=7, R=dim42
25skip STA NE DYN, L=enu7, R=dim42
26skip DYN NE DYN, L=cpr7, R=dim42
27done DYN EQ DYN, L=dim7, R=dim7
28skip DYN NE DYN, L=dim7, R=dim42
29skip DYN NE STA, L=dim7, R=42
30skip DYN NE STA, L=dim7, R=enu42
31skip DYN NE DYN, L=dim7, R=cpr42
32skip DYN NE UNS, L=dim7, R=mut42
33skip UNS NE DYN, L=mut7, R=dim42
[0f4ac10]34---- PTRVAR_INIT:   { typeof( mkar_( ((tag(float)){}) , ((tag(__R__)){}) ) ) a; typeof( mkar_( ((tag(float)){}) , ((tag(__L__)){}) ) ) * b = & a; }
35done STA EQ STA, L=7, R=7
[f02f546]36skip STA NE STA, L=7, R=42
[0f4ac10]37done STA EQ STA, L=7, R=enu7
[f02f546]38skip STA NE STA, L=7, R=enu42
[0f4ac10]39skip STA NE DYN, L=7, R=cpr42
40skip STA NE UNS, L=7, R=mut42
41done STA EQ STA, L=enu7, R=enu7
[f02f546]42skip STA NE STA, L=enu7, R=enu42
[0f4ac10]43done STA EQ STA, L=enu7, R=7
[f02f546]44skip STA NE STA, L=enu7, R=42
[0f4ac10]45skip STA NE DYN, L=enu7, R=cpr42
46skip STA NE UNS, L=enu7, R=mut42
47done DYN EQ DYN, L=cpr7, R=cpr7
[f02f546]48skip DYN NE DYN, L=cpr7, R=cpr42
[0f4ac10]49skip DYN NE STA, L=cpr7, R=42
50skip DYN NE STA, L=cpr7, R=enu42
[f02f546]51skip DYN NE UNS, L=cpr7, R=mut42
52skip UNS EQ UNS, L=mut7, R=mut7
53skip UNS NE UNS, L=mut7, R=mut42
[0f4ac10]54skip UNS NE STA, L=mut7, R=42
55skip UNS NE STA, L=mut7, R=enu42
[f02f546]56skip UNS NE DYN, L=mut7, R=cpr42
57skip STA NE DYN, L=7, R=dim42
58skip STA NE DYN, L=enu7, R=dim42
59skip DYN NE DYN, L=cpr7, R=dim42
60done DYN EQ DYN, L=dim7, R=dim7
61skip DYN NE DYN, L=dim7, R=dim42
62skip DYN NE STA, L=dim7, R=42
63skip DYN NE STA, L=dim7, R=enu42
64skip DYN NE DYN, L=dim7, R=cpr42
65skip DYN NE UNS, L=dim7, R=mut42
66skip UNS NE DYN, L=mut7, R=dim42
[0f4ac10]67---- PTRVAR_ASGN:   { typeof( mkar_( ((tag(float)){}) , ((tag(__R__)){}) ) ) a; typeof( mkar_( ((tag(float)){}) , ((tag(__L__)){}) ) ) * b = 0p; b = & a; }
68done STA EQ STA, L=7, R=7
[f02f546]69skip STA NE STA, L=7, R=42
[0f4ac10]70done STA EQ STA, L=7, R=enu7
[f02f546]71skip STA NE STA, L=7, R=enu42
[0f4ac10]72skip STA NE DYN, L=7, R=cpr42
73skip STA NE UNS, L=7, R=mut42
74done STA EQ STA, L=enu7, R=enu7
[f02f546]75skip STA NE STA, L=enu7, R=enu42
[0f4ac10]76done STA EQ STA, L=enu7, R=7
[f02f546]77skip STA NE STA, L=enu7, R=42
[0f4ac10]78skip STA NE DYN, L=enu7, R=cpr42
79skip STA NE UNS, L=enu7, R=mut42
80done DYN EQ DYN, L=cpr7, R=cpr7
[f02f546]81skip DYN NE DYN, L=cpr7, R=cpr42
[0f4ac10]82skip DYN NE STA, L=cpr7, R=42
83skip DYN NE STA, L=cpr7, R=enu42
[f02f546]84skip DYN NE UNS, L=cpr7, R=mut42
85skip UNS EQ UNS, L=mut7, R=mut7
86skip UNS NE UNS, L=mut7, R=mut42
[0f4ac10]87skip UNS NE STA, L=mut7, R=42
88skip UNS NE STA, L=mut7, R=enu42
[f02f546]89skip UNS NE DYN, L=mut7, R=cpr42
90skip STA NE DYN, L=7, R=dim42
91skip STA NE DYN, L=enu7, R=dim42
92skip DYN NE DYN, L=cpr7, R=dim42
93done DYN EQ DYN, L=dim7, R=dim7
94skip DYN NE DYN, L=dim7, R=dim42
95skip DYN NE STA, L=dim7, R=42
96skip DYN NE STA, L=dim7, R=enu42
97skip DYN NE DYN, L=dim7, R=cpr42
98skip DYN NE UNS, L=dim7, R=mut42
99skip UNS NE DYN, L=mut7, R=dim42
[0f4ac10]100---- REFPARM_CALL:   { void f( typeof( mkar_( ((tag(float)){}) , ((tag(__L__)){}) ) ) & x ) {} typeof( mkar_( ((tag(float)){}) , ((tag(__R__)){}) ) ) a; f( a ); }
101done STA EQ STA, L=7, R=7
[f02f546]102skip STA NE STA, L=7, R=42
[0f4ac10]103done STA EQ STA, L=7, R=enu7
[f02f546]104skip STA NE STA, L=7, R=enu42
[0f4ac10]105skip STA NE DYN, L=7, R=cpr42
106skip STA NE UNS, L=7, R=mut42
107done STA EQ STA, L=enu7, R=enu7
[f02f546]108skip STA NE STA, L=enu7, R=enu42
[0f4ac10]109done STA EQ STA, L=enu7, R=7
[f02f546]110skip STA NE STA, L=enu7, R=42
[0f4ac10]111skip STA NE DYN, L=enu7, R=cpr42
112skip STA NE UNS, L=enu7, R=mut42
113done DYN EQ DYN, L=cpr7, R=cpr7
[f02f546]114skip DYN NE DYN, L=cpr7, R=cpr42
[0f4ac10]115skip DYN NE STA, L=cpr7, R=42
116skip DYN NE STA, L=cpr7, R=enu42
[f02f546]117skip DYN NE UNS, L=cpr7, R=mut42
118skip UNS EQ UNS, L=mut7, R=mut7
119skip UNS NE UNS, L=mut7, R=mut42
[0f4ac10]120skip UNS NE STA, L=mut7, R=42
121skip UNS NE STA, L=mut7, R=enu42
[f02f546]122skip UNS NE DYN, L=mut7, R=cpr42
123skip STA NE DYN, L=7, R=dim42
124skip STA NE DYN, L=enu7, R=dim42
125skip DYN NE DYN, L=cpr7, R=dim42
126done DYN EQ DYN, L=dim7, R=dim7
127skip DYN NE DYN, L=dim7, R=dim42
128skip DYN NE STA, L=dim7, R=42
129skip DYN NE STA, L=dim7, R=enu42
130skip DYN NE DYN, L=dim7, R=cpr42
131skip DYN NE UNS, L=dim7, R=mut42
132skip UNS NE DYN, L=mut7, R=dim42
[0f4ac10]133---- REFVAR_INIT:   { typeof( mkar_( ((tag(float)){}) , ((tag(__R__)){}) ) ) a; typeof( mkar_( ((tag(float)){}) , ((tag(__L__)){}) ) ) & b = a; }
134done STA EQ STA, L=7, R=7
[f02f546]135skip STA NE STA, L=7, R=42
[0f4ac10]136done STA EQ STA, L=7, R=enu7
[f02f546]137skip STA NE STA, L=7, R=enu42
[0f4ac10]138skip STA NE DYN, L=7, R=cpr42
139skip STA NE UNS, L=7, R=mut42
140done STA EQ STA, L=enu7, R=enu7
[f02f546]141skip STA NE STA, L=enu7, R=enu42
[0f4ac10]142done STA EQ STA, L=enu7, R=7
[f02f546]143skip STA NE STA, L=enu7, R=42
[0f4ac10]144skip STA NE DYN, L=enu7, R=cpr42
145skip STA NE UNS, L=enu7, R=mut42
146done DYN EQ DYN, L=cpr7, R=cpr7
[f02f546]147skip DYN NE DYN, L=cpr7, R=cpr42
[0f4ac10]148skip DYN NE STA, L=cpr7, R=42
149skip DYN NE STA, L=cpr7, R=enu42
[f02f546]150skip DYN NE UNS, L=cpr7, R=mut42
151skip UNS EQ UNS, L=mut7, R=mut7
152skip UNS NE UNS, L=mut7, R=mut42
[0f4ac10]153skip UNS NE STA, L=mut7, R=42
154skip UNS NE STA, L=mut7, R=enu42
[f02f546]155skip UNS NE DYN, L=mut7, R=cpr42
156skip STA NE DYN, L=7, R=dim42
157skip STA NE DYN, L=enu7, R=dim42
158skip DYN NE DYN, L=cpr7, R=dim42
159done DYN EQ DYN, L=dim7, R=dim7
160skip DYN NE DYN, L=dim7, R=dim42
161skip DYN NE STA, L=dim7, R=42
162skip DYN NE STA, L=dim7, R=enu42
163skip DYN NE DYN, L=dim7, R=cpr42
164skip DYN NE UNS, L=dim7, R=mut42
165skip UNS NE DYN, L=mut7, R=dim42
[0f4ac10]166---- REFVAR_ASGN:   { typeof( mkar_( ((tag(float)){}) , ((tag(__R__)){}) ) ) a; typeof( mkar_( ((tag(float)){}) , ((tag(__L__)){}) ) ) & b = *0p; & b = & a; }
167done STA EQ STA, L=7, R=7
[f02f546]168skip STA NE STA, L=7, R=42
[0f4ac10]169done STA EQ STA, L=7, R=enu7
[f02f546]170skip STA NE STA, L=7, R=enu42
[0f4ac10]171skip STA NE DYN, L=7, R=cpr42
172skip STA NE UNS, L=7, R=mut42
173done STA EQ STA, L=enu7, R=enu7
[f02f546]174skip STA NE STA, L=enu7, R=enu42
[0f4ac10]175done STA EQ STA, L=enu7, R=7
[f02f546]176skip STA NE STA, L=enu7, R=42
[0f4ac10]177skip STA NE DYN, L=enu7, R=cpr42
178skip STA NE UNS, L=enu7, R=mut42
179done DYN EQ DYN, L=cpr7, R=cpr7
[f02f546]180skip DYN NE DYN, L=cpr7, R=cpr42
[0f4ac10]181skip DYN NE STA, L=cpr7, R=42
182skip DYN NE STA, L=cpr7, R=enu42
[f02f546]183skip DYN NE UNS, L=cpr7, R=mut42
184skip UNS EQ UNS, L=mut7, R=mut7
185skip UNS NE UNS, L=mut7, R=mut42
[0f4ac10]186skip UNS NE STA, L=mut7, R=42
187skip UNS NE STA, L=mut7, R=enu42
[f02f546]188skip UNS NE DYN, L=mut7, R=cpr42
189skip STA NE DYN, L=7, R=dim42
190skip STA NE DYN, L=enu7, R=dim42
191skip DYN NE DYN, L=cpr7, R=dim42
192done DYN EQ DYN, L=dim7, R=dim7
193skip DYN NE DYN, L=dim7, R=dim42
194skip DYN NE STA, L=dim7, R=42
195skip DYN NE STA, L=dim7, R=enu42
196skip DYN NE DYN, L=dim7, R=cpr42
197skip DYN NE UNS, L=dim7, R=mut42
198skip UNS NE DYN, L=mut7, R=dim42
[0f4ac10]199---- CALLZIP:   { typeof( mkar_( ((tag(float)){}) , ((tag(__L__)){}) ) ) a; typeof( mkar_( ((tag(float)){}) , ((tag(__R__)){}) ) ) b; zip( a, b ); }
200done STA EQ STA, L=7, R=7
[f02f546]201skip STA NE STA, L=7, R=42
[0f4ac10]202done STA EQ STA, L=7, R=enu7
[f02f546]203skip STA NE STA, L=7, R=enu42
[0f4ac10]204skip STA NE DYN, L=7, R=cpr42
205skip STA NE UNS, L=7, R=mut42
206done STA EQ STA, L=enu7, R=enu7
[f02f546]207skip STA NE STA, L=enu7, R=enu42
[0f4ac10]208done STA EQ STA, L=enu7, R=7
[f02f546]209skip STA NE STA, L=enu7, R=42
[0f4ac10]210skip STA NE DYN, L=enu7, R=cpr42
211skip STA NE UNS, L=enu7, R=mut42
212done DYN EQ DYN, L=cpr7, R=cpr7
[f02f546]213skip DYN NE DYN, L=cpr7, R=cpr42
[0f4ac10]214skip DYN NE STA, L=cpr7, R=42
215skip DYN NE STA, L=cpr7, R=enu42
[f02f546]216skip DYN NE UNS, L=cpr7, R=mut42
217skip UNS EQ UNS, L=mut7, R=mut7
218skip UNS NE UNS, L=mut7, R=mut42
[0f4ac10]219skip UNS NE STA, L=mut7, R=42
220skip UNS NE STA, L=mut7, R=enu42
[f02f546]221skip UNS NE DYN, L=mut7, R=cpr42
222skip STA NE DYN, L=7, R=dim42
223skip STA NE DYN, L=enu7, R=dim42
224skip DYN NE DYN, L=cpr7, R=dim42
225done DYN EQ DYN, L=dim7, R=dim7
226skip DYN NE DYN, L=dim7, R=dim42
227skip DYN NE STA, L=dim7, R=42
228skip DYN NE STA, L=dim7, R=enu42
229skip DYN NE DYN, L=dim7, R=cpr42
230skip DYN NE UNS, L=dim7, R=mut42
231skip UNS NE DYN, L=mut7, R=dim42
Note: See TracBrowser for help on using the repository browser.