Ignore:
Timestamp:
Jun 21, 2023, 1:28:09 PM (16 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
6065281f
Parents:
2de175ce
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/array-container/.expect/dimexpr-match-c.txt

    r2de175ce rf02f546  
    1313skip STA NE UNS, L=enu7, R=mut42
    1414done DYN EQ DYN, L=cpr7, R=cpr7
    15 done DYN NE DYN, L=cpr7, R=cpr42
     15skip DYN NE DYN, L=cpr7, R=cpr42
    1616skip DYN NE STA, L=cpr7, R=42
    1717skip DYN NE STA, L=cpr7, R=enu42
    18 done DYN NE UNS, L=cpr7, R=mut42
    19 done UNS EQ UNS, L=mut7, R=mut7
    20 done UNS NE UNS, L=mut7, R=mut42
     18skip DYN NE UNS, L=cpr7, R=mut42
     19skip UNS EQ UNS, L=mut7, R=mut7
     20skip UNS NE UNS, L=mut7, R=mut42
    2121skip UNS NE STA, L=mut7, R=42
    2222skip UNS NE STA, L=mut7, R=enu42
    23 done UNS NE DYN, L=mut7, R=cpr42
     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
    2434---- PTRVAR_INIT:   { float a[__R__]; float (*b)[__L__] = & a; }
    2535done STA EQ STA, L=7, R=7
     
    3646skip STA NE UNS, L=enu7, R=mut42
    3747done DYN EQ DYN, L=cpr7, R=cpr7
    38 done DYN NE DYN, L=cpr7, R=cpr42
     48skip DYN NE DYN, L=cpr7, R=cpr42
    3949skip DYN NE STA, L=cpr7, R=42
    4050skip DYN NE STA, L=cpr7, R=enu42
    41 done DYN NE UNS, L=cpr7, R=mut42
    42 done UNS EQ UNS, L=mut7, R=mut7
    43 done UNS NE UNS, L=mut7, R=mut42
     51skip DYN NE UNS, L=cpr7, R=mut42
     52skip UNS EQ UNS, L=mut7, R=mut7
     53skip UNS NE UNS, L=mut7, R=mut42
    4454skip UNS NE STA, L=mut7, R=42
    4555skip UNS NE STA, L=mut7, R=enu42
    46 done UNS NE DYN, L=mut7, R=cpr42
     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
    4767---- PTRVAR_ASGN:   { float a[__R__]; float (*b)[__L__] = 0p; b = & a; }
    4868done STA EQ STA, L=7, R=7
     
    5979skip STA NE UNS, L=enu7, R=mut42
    6080done DYN EQ DYN, L=cpr7, R=cpr7
    61 done DYN NE DYN, L=cpr7, R=cpr42
     81skip DYN NE DYN, L=cpr7, R=cpr42
    6282skip DYN NE STA, L=cpr7, R=42
    6383skip DYN NE STA, L=cpr7, R=enu42
    64 done DYN NE UNS, L=cpr7, R=mut42
    65 done UNS EQ UNS, L=mut7, R=mut7
    66 done UNS NE UNS, L=mut7, R=mut42
     84skip DYN NE UNS, L=cpr7, R=mut42
     85skip UNS EQ UNS, L=mut7, R=mut7
     86skip UNS NE UNS, L=mut7, R=mut42
    6787skip UNS NE STA, L=mut7, R=42
    6888skip UNS NE STA, L=mut7, R=enu42
    69 done UNS NE DYN, L=mut7, R=cpr42
     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
    70100---- REFVAR_ASGN:   { float a[__R__]; float (&b)[__L__] = *0p; & b = & a; }
    71101done STA EQ STA, L=7, R=7
     
    82112skip STA NE UNS, L=enu7, R=mut42
    83113done DYN EQ DYN, L=cpr7, R=cpr7
    84 done DYN NE DYN, L=cpr7, R=cpr42
     114skip DYN NE DYN, L=cpr7, R=cpr42
    85115skip DYN NE STA, L=cpr7, R=42
    86116skip DYN NE STA, L=cpr7, R=enu42
    87 done DYN NE UNS, L=cpr7, R=mut42
    88 done UNS EQ UNS, L=mut7, R=mut7
    89 done UNS NE UNS, L=mut7, R=mut42
     117skip DYN NE UNS, L=cpr7, R=mut42
     118skip UNS EQ UNS, L=mut7, R=mut7
     119skip UNS NE UNS, L=mut7, R=mut42
    90120skip UNS NE STA, L=mut7, R=42
    91121skip UNS NE STA, L=mut7, R=enu42
    92 done UNS NE DYN, L=mut7, R=cpr42
     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
Note: See TracChangeset for help on using the changeset viewer.