Opened 4 years ago

Closed 4 years ago

#5310 closed bug (fixed)

Validate fails due to overlapping pattern in StgCmmExpr

Reported by: daniel.is.fischer Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

The failure due to -Werror:

compiler/codeGen/StgCmmExpr.hs:55:1:
    Warning: Pattern match(es) are overlapped
             In an equation for `cgExpr':
                 cgExpr (StgOpApp (StgPrimOp SeqOp) [StgVarArg a, _] _res_ty) = ...

<no location info>: 
Failing due to -Werror.

The special case for the new seq primop was below the general

cgExpr (StgOpApp op args ty) = cgOpApp op args ty

and thus would never have been reached.
I moved it above (currently validating) to fix that.

Attachments (2)

0001-Move-case-for-seq-in-cgExpr-above-general-StgOpApp.patch (8.9 KB) - added by daniel.is.fischer 4 years ago.
patch including removal of trailing whitespace
0001-Move-special-case-for-seq-up-to-fix-overlap.patch (1.3 KB) - added by daniel.is.fischer 4 years ago.
patch without removal of trailing whitespace

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by daniel.is.fischer

patch including removal of trailing whitespace

Changed 4 years ago by daniel.is.fischer

patch without removal of trailing whitespace

comment:1 Changed 4 years ago by daniel.is.fischer

  • Status changed from new to patch

I did the natural thing, please confirm that is also the right thing before applying.

comment:2 Changed 4 years ago by daniel.is.fischer

Validate okay, no unexpected results in the fast testsuite run, only the usual six

Unexpected failures:
   codeGen/should_run    cgrun068 [exit code non-0] (dyn)
   dph/diophantine       dph-diophantine-opt [bad stdout] (normal,threaded1,threaded2)
   plugins               plugins05 [exit code non-0] (dyn)
   typecheck/should_run  T4809 [exit code non-0] (dyn)

in the full test.

comment:3 Changed 4 years ago by daniel.is.fischer

  • Resolution set to fixed
  • Status changed from patch to closed
Note: See TracTickets for help on using tickets.