(command.CommandList
  children: [
    (command.ShFunction
      name: check_cmp
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Pipeline
                          children: [
                            (C {<cmp>} {<-s>} {(DQ ($ Id.VSub_Number '$1'))} 
                              {(DQ ($ Id.VSub_Number '$2'))}
                            )
                          ]
                          negated: T
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(DQ <'Actual output differs from expected:'>)})
                    (C {<echo>} {(DQ <'diff '> ($ Id.VSub_Number '$1') <' '> ($ Id.VSub_Number '$2'))})
                    (C {<diff>} {($ Id.VSub_Number '$1')} {($ Id.VSub_Number '$2')})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [68 85]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Pipeline
                          children: [
                            (C {<grep>} {<-q>} {(DQ ($ Id.VSub_Number '$2'))} 
                              {(DQ ($ Id.VSub_Number '$1'))}
                            )
                          ]
                          negated: T
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {(DQ <'Did not find expected output in '> ($ Id.VSub_Number '$1') <':'>)}
                    )
                    (C {<echo>} {(DQ <'   '> ($ Id.VSub_Number '$2'))})
                    (C {<echo>} {(DQ )})
                    (C {<echo>} {(DQ <'Actual output below:'>)})
                    (C {<cat>} {(DQ ($ Id.VSub_Number '$1'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [129 146]
                )
              ]
            )
          ]
        )
    )
    (command.Pipeline
      children: [
        (C {<cat>} {<incremental_test.cmdline>})
        (C {<grep>} {(DQ <'gcctestdir/ld '>)})
        (C {<sed>} {(DQ <'s/--incremental[-a-z]* //g'>)})
        (command.Simple
          words: [{<cut>} {<-d>} {(SQ <' '>)} {<-f>} {<2->}]
          redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<actual>})]
          do_fork: T
        )
      ]
      negated: F
    )
    (command.Pipeline
      children: [
        (C {<cat>} {<incremental_test.stdout>})
        (C {<grep>} {(DQ <'Link command line'>)})
        (C {<cut>} {<-d>} {<Id.Lit_Colon ':'>} {<-f>} {<2->})
        (C {<cut>} {<-d>} {(SQ <' '>)} {<-f>} {<3->})
        (command.Simple
          words: [{<sed>} {(DQ <'s/\'//g'>)}]
          redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<recorded>})]
          do_fork: T
        )
      ]
      negated: F
    )
    (C {<check_cmp>} {<actual>} {<recorded>})
    (C {<rm>} {<-f>} {<actual>} {<recorded>})
    (command.Simple
      words: [
        {<awk>}
        {
          (SQ <'\n'> <'    /^[A-Za-z][A-Za-z ]+:$/ { section = $0; }\n'> 
            <'    /^[[]/ { subsection = $0; }\n'> <'    /^ / { print section, subsection, $0; }\n'>
          )
        }
      ]
      redirects: [
        (redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<incremental_test.stdout>})
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<incremental_test.dump>})
      ]
      do_fork: T
    )
    (C {<check>} {<incremental_test.dump>} {(DQ <'Input sections: .* incremental_test_1.o  *1 '>)})
    (C {<check>} {<incremental_test.dump>} {(DQ <'Input sections: .* incremental_test_2.o  *1 '>)})
    (C {<check>} {<incremental_test.dump>} {(DQ <'Global symbol table: .* main  .* relocation type '>)})
    (C {<check>} {<incremental_test.dump>} {(DQ <'Global symbol table: .* a  *incremental_test_1.o '>)})
    (C {<check>} {<incremental_test.dump>} {(DQ <'Global symbol table: .* a .* relocation type '>)})
    (C {<check>} {<incremental_test.dump>} {(DQ <'Global symbol table: .* b  *incremental_test_2.o '>)})
    (C {<check>} {<incremental_test.dump>} {(DQ <'Global symbol table: .* b .* relocation type '>)})
    (C {<check>} {<incremental_test.dump>} {(DQ <'Global symbol table: .* t1  *incremental_test_2.o '>)})
    (C {<check>} {<incremental_test.dump>} {(DQ <'Global symbol table: .* t1 .* relocation type '>)})
    (C {<rm>} {<-f>} {<incremental_test.dump>})
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)