Opened 3 years ago

Closed 3 years ago

#5345 closed bug (fixed)

stg lint error

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.0.3
Keywords: Cc: serg.foo@…
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Other Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I've got stg lint error when compiled following program with optimisation

module Main where
import Data.Complex

pointInFractalSet :: Complex Double -> [Complex Double]
pointInFractalSet c@(x :+ y) = iterate f z
    where
        z = 0.0 :+ 0.0

        f :: Complex Double -> Complex Double
        f x = c * exp (c * x)

main = do
    let p = 1.4041061592388573 :+ (-1.6264396594892343)
    mapM_ (putStrLn . show) $ take 20 $ pointInFractalSet p
ghc -O Test.hs -dstg-lint -fforce-recomp

Stg lint error:

ghc: panic! (the 'impossible' happened)
  (GHC version 7.0.3 for x86_64-unknown-linux):
	    *** Stg Lint ErrMsgs: in Stg2Stg ***
    <no location info>:
         [in body of letrec with binders sat_s139{v} [lid] :: base:GHC.Base.String{tc 36u}]
        In a function application, function type doesn't match arg types:
        Function type:
            ghc-prim:GHC.Prim.Int#{(w) tc 3G}
            -> ghc-prim:GHC.Types.IO{tc 32I} ghc-prim:GHC.Unit.(){(w) tc 40}
        Arg types:
            ghc-prim:GHC.Prim.Int#{(w) tc 3G}
            ghc-prim:GHC.Prim.State#{(w) tc 32q}
              ghc-prim:GHC.Prim.RealWorld{(w) tc 31E}
        Expression: xs{v s11o} [lid] sat_s137{v} [lid] new_s{v s11q} [lid]
    *** Offending Program ***
    main:Main.main3{v rc} [gid] =
        NO_CCS ghc-prim:GHC.Types.D#{(w) d 66}! [0.0];
    main:Main.main2{v ri} [gid] =
        NO_CCS base:Data.Complex.:+{d rk}! [main:Main.main3{v rc} [gid]
                                            main:Main.main3{v rc} [gid]];
    main:Main.main5{v rf} [gid] =
        [] \r srt:SRT:[(r9,
                        base:Data.Complex.$fFloatingComplex_$s$cshow1{v r9} [gid]),
                       (ra, base:GHC.IO.Handle.FD.stdout{v ra} [gid]),
                       (rb,
                        base:GHC.IO.Handle.Text.hPutStr2{v rb} [gid])] [x{v s11i} [lid]
                                                                        xs{v s11o} [lid]
                                                                        m{v s11g} [lid]
                                                                        eta{v s11k} [lid]]
            case
                <=#{v} [m{v s11g} [lid] 1] :: Alg ghc-prim:GHC.Bool.Bool{(w) tc 3c}
            of
            wild{v s136} [lid]
            {   -- lvs: [m{v s11g} [lid]
                         x{v s11i} [lid]
                         eta{v s11k} [lid]
                         xs{v s11o} [lid]]; rhs lvs: [m{v s11g} [lid]
                                                      x{v s11i} [lid]
                                                      eta{v s11k} [lid]
                                                      xs{v s11o} [lid]]; srt:SRT:[(r9,
                                                                                   base:Data.Complex.$fFloatingComplex_$s$cshow1{v r9} [gid]),
                                                                                  (ra,
                                                                                   base:GHC.IO.Handle.FD.stdout{v ra} [gid]),
                                                                                  (rb,
                                                                                   base:GHC.IO.Handle.Text.hPutStr2{v rb} [gid])]
              ghc-prim:GHC.Bool.False{(w) d 68} ->
                  let {
                    sat_s139{v} [lid] =
                        [x{v s11i} [lid]] \u srt:SRT:[(r9,
                                                       base:Data.Complex.$fFloatingComplex_$s$cshow1{v r9} [gid])] []
                            base:Data.Complex.$fFloatingComplex_$s$cshow1{v r9} [gid]
                                x{v s11i} [lid];
                  } in 
                    case
                        base:GHC.IO.Handle.Text.hPutStr2{v rb} [gid]
                            base:GHC.IO.Handle.FD.stdout{v ra} [gid]
                            sat_s139{v} [lid]
                            ghc-prim:GHC.Bool.True{(w) v 6v} [gid[DataCon]]
                            eta{v s11k} [lid] :: UbxTup ghc-prim:GHC.Prim.(#,#){(w) tc 56}
                    of
                    wild1{v s138} [lid]
                    {   -- lvs: [m{v s11g} [lid]
                                 eta{v s11k} [lid]
                                 xs{v s11o} [lid]
                                 sat_s139{v} [lid]]; rhs lvs: [m{v s11g} [lid]
                                                               xs{v s11o} [lid]]; srt:SRT:[]
                      ghc-prim:GHC.Prim.(#,#){(w) d 84} new_s{v s11q} [lid]
                                                        a1{v s13a} [lid] ->
                          case
                              -#{v} [m{v s11g} [lid] 1] :: Prim ghc-prim:GHC.Prim.Int#{(w) tc 3G}
                          of
                          sat_s137{v} [lid]
                          {   -- lvs: [m{v s11g} [lid]
                                       xs{v s11o} [lid]
                                       new_s{v s11q} [lid]]; rhs lvs: [xs{v s11o} [lid]
                                                                       new_s{v s11q} [lid]]; srt:SRT:[]
                            __DEFAULT ->
                                xs{v s11o} [lid] sat_s137{v} [lid] new_s{v s11q} [lid];
                          };
                    };
              ghc-prim:GHC.Bool.True{(w) d 6u} ->
                  let {
                    sat_s13c{v} [lid] =
                        [x{v s11i} [lid]] \u srt:SRT:[(r9,
                                                       base:Data.Complex.$fFloatingComplex_$s$cshow1{v r9} [gid])] []
                            base:Data.Complex.$fFloatingComplex_$s$cshow1{v r9} [gid]
                                x{v s11i} [lid];
                  } in 
                    case
                        base:GHC.IO.Handle.Text.hPutStr2{v rb} [gid]
                            base:GHC.IO.Handle.FD.stdout{v ra} [gid]
                            sat_s13c{v} [lid]
                            ghc-prim:GHC.Bool.True{(w) v 6v} [gid[DataCon]]
                            eta{v s11k} [lid] :: UbxTup ghc-prim:GHC.Prim.(#,#){(w) tc 56}
                    of
                    wild1{v s13b} [lid]
                    {   -- lvs: [eta{v s11k} [lid]
                                 sat_s13c{v} [lid]]; rhs lvs: []; srt:SRT:[]
                      ghc-prim:GHC.Prim.(#,#){(w) d 84} new_s{v s11v} [lid]
                                                        a1{v s13d} [lid] ->
                          ghc-prim:GHC.Prim.(#,#){(w) d 84} [new_s{v s11v} [lid]
                                                             ghc-prim:GHC.Unit.(){(w) v 71} [gid[DataCon]]];
                    };
            };
    main:Main.main4{v rd} [gid] =
        [] \r srt:SRT:[] [x{v s11x} [lid]]
            case
                x{v s11x} [lid] :: Alg base:Data.Complex.Complex{tc rm}
            of
            w3{v s13o} [lid]
            {   -- lvs: [x{v s11x} [lid]]; rhs lvs: []; srt:SRT:[]
              base:Data.Complex.:+{d rk} ww6{v s11B} [lid] ww7{v s11E} [lid] ->
                  case
                      ww6{v s11B} [lid] :: Alg ghc-prim:GHC.Types.Double{(w) tc 3u}
                  of
                  ww8{v s13n} [lid]
                  {   -- lvs: [ww6{v s11B} [lid]
                               ww7{v s11E} [lid]]; rhs lvs: [ww7{v s11E} [lid]]; srt:SRT:[]
                    ghc-prim:GHC.Types.D#{(w) d 66} ww9{v s11I} [lid] ->
                        case
                            ww7{v s11E} [lid] :: Alg ghc-prim:GHC.Types.Double{(w) tc 3u}
                        of
                        ww10{v s13m} [lid]
                        {   -- lvs: [ww7{v s11E} [lid]
                                     ww9{v s11I} [lid]]; rhs lvs: [ww9{v s11I} [lid]]; srt:SRT:[]
                          ghc-prim:GHC.Types.D#{(w) d 66} ww11{v s11K} [lid] ->
                              case
                                  *##{v} [-1.6264396594892343
                                          ww11{v s11K} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                              of
                              sat_s13l{v} [lid]
                              {   -- lvs: [ww9{v s11I} [lid]
                                           ww11{v s11K} [lid]]; rhs lvs: [ww9{v s11I} [lid]
                                                                          ww11{v s11K} [lid]]; srt:SRT:[]
                                __DEFAULT ->
                                    case
                                        *##{v} [1.4041061592388573
                                                ww9{v s11I} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                    of
                                    sat_s13k{v} [lid]
                                    {   -- lvs: [ww9{v s11I} [lid]
                                                 ww11{v s11K} [lid]
                                                 sat_s13l{v} [lid]]; rhs lvs: [ww9{v s11I} [lid]
                                                                               ww11{v s11K} [lid]
                                                                               sat_s13l{v} [lid]]; srt:SRT:[]
                                      __DEFAULT ->
                                          case
                                              -##{v} [sat_s13k{v} [lid]
                                                      sat_s13l{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                          of
                                          sat_s13j{v} [lid]
                                          {   -- lvs: [ww9{v s11I} [lid]
                                                       ww11{v s11K} [lid]
                                                       sat_s13k{v} [lid]
                                                       sat_s13l{v} [lid]]; rhs lvs: [ww9{v s11I} [lid]
                                                                                     ww11{v s11K} [lid]]; srt:SRT:[]
                                            __DEFAULT ->
                                                case
                                                    expDouble#{v} [sat_s13j{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                of
                                                x1{v s11N} [lid]
                                                {   -- lvs: [ww9{v s11I} [lid]
                                                             ww11{v s11K} [lid]
                                                             sat_s13j{v} [lid]]; rhs lvs: [ww9{v s11I} [lid]
                                                                                           ww11{v s11K} [lid]]; srt:SRT:[]
                                                  __DEFAULT ->
                                                      case
                                                          *##{v} [-1.6264396594892343
                                                                  ww9{v s11I} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                      of
                                                      sat_s13i{v} [lid]
                                                      {   -- lvs: [ww9{v s11I} [lid]
                                                                   ww11{v s11K} [lid]
                                                                   x1{v s11N} [lid]]; rhs lvs: [ww11{v s11K} [lid]
                                                                                                x1{v s11N} [lid]]; srt:SRT:[]
                                                        __DEFAULT ->
                                                            case
                                                                *##{v} [1.4041061592388573
                                                                        ww11{v s11K} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                            of
                                                            sat_s13h{v} [lid]
                                                            {   -- lvs: [ww11{v s11K} [lid]
                                                                         x1{v s11N} [lid]
                                                                         sat_s13i{v} [lid]]; rhs lvs: [x1{v s11N} [lid]
                                                                                                       sat_s13i{v} [lid]]; srt:SRT:[]
                                                              __DEFAULT ->
                                                                  case
                                                                      +##{v} [sat_s13h{v} [lid]
                                                                              sat_s13i{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                  of
                                                                  ww1{v s11R} [lid]
                                                                  {   -- lvs: [x1{v s11N} [lid]
                                                                               sat_s13h{v} [lid]
                                                                               sat_s13i{v} [lid]]; rhs lvs: [x1{v s11N} [lid]]; srt:SRT:[]
                                                                    __DEFAULT ->
                                                                        case
                                                                            sinDouble#{v} [ww1{v s11R} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                        of
                                                                        sat_s13g{v} [lid]
                                                                        {   -- lvs: [x1{v s11N} [lid]
                                                                                     ww1{v s11R} [lid]]; rhs lvs: [x1{v s11N} [lid]
                                                                                                                   ww1{v s11R} [lid]]; srt:SRT:[]
                                                                          __DEFAULT ->
                                                                              case
                                                                                  *##{v} [x1{v s11N} [lid]
                                                                                          sat_s13g{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                              of
                                                                              a{v s11U} [lid]
                                                                              {   -- lvs: [x1{v s11N} [lid]
                                                                                           ww1{v s11R} [lid]
                                                                                           sat_s13g{v} [lid]]; rhs lvs: [x1{v s11N} [lid]
                                                                                                                         ww1{v s11R} [lid]]; srt:SRT:[]
                                                                                __DEFAULT ->
                                                                                    case
                                                                                        cosDouble#{v} [ww1{v s11R} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                    of
                                                                                    sat_s13f{v} [lid]
                                                                                    {   -- lvs: [x1{v s11N} [lid]
                                                                                                 ww1{v s11R} [lid]
                                                                                                 a{v s11U} [lid]]; rhs lvs: [x1{v s11N} [lid]
                                                                                                                             a{v s11U} [lid]]; srt:SRT:[]
                                                                                      __DEFAULT ->
                                                                                          case
                                                                                              *##{v} [x1{v s11N} [lid]
                                                                                                      sat_s13f{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                          of
                                                                                          a1{v s11X} [lid]
                                                                                          {   -- lvs: [x1{v s11N} [lid]
                                                                                                       a{v s11U} [lid]
                                                                                                       sat_s13f{v} [lid]]; rhs lvs: [a{v s11U} [lid]]; srt:SRT:[]
                                                                                            __DEFAULT ->
                                                                                                case
                                                                                                    *##{v} [-1.6264396594892343
                                                                                                            a1{v s11X} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                                of
                                                                                                sat_s128{v} [lid]
                                                                                                {   -- lvs: [a{v s11U} [lid]
                                                                                                             a1{v s11X} [lid]]; rhs lvs: [a{v s11U} [lid]
                                                                                                                                          a1{v s11X} [lid]]; srt:SRT:[]
                                                                                                  __DEFAULT ->
                                                                                                      case
                                                                                                          *##{v} [1.4041061592388573
                                                                                                                  a{v s11U} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                                      of
                                                                                                      sat_s127{v} [lid]
                                                                                                      {   -- lvs: [a{v s11U} [lid]
                                                                                                                   a1{v s11X} [lid]
                                                                                                                   sat_s128{v} [lid]]; rhs lvs: [a{v s11U} [lid]
                                                                                                                                                 a1{v s11X} [lid]
                                                                                                                                                 sat_s128{v} [lid]]; srt:SRT:[]
                                                                                                        __DEFAULT ->
                                                                                                            case
                                                                                                                +##{v} [sat_s127{v} [lid]
                                                                                                                        sat_s128{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                                            of
                                                                                                            sat_s13e{v} [lid]
                                                                                                            {   -- lvs: [a{v s11U} [lid]
                                                                                                                         a1{v s11X} [lid]
                                                                                                                         sat_s127{v} [lid]
                                                                                                                         sat_s128{v} [lid]]; rhs lvs: [a{v s11U} [lid]
                                                                                                                                                       a1{v s11X} [lid]]; srt:SRT:[]
                                                                                                              __DEFAULT ->
                                                                                                                  let {
                                                                                                                    sat_s13q{v} [lid] =
                                                                                                                        NO_CCS ghc-prim:GHC.Types.D#{(w) d 66}! [sat_s13e{v} [lid]];
                                                                                                                  } in 
                                                                                                                    case
                                                                                                                        *##{v} [-1.6264396594892343
                                                                                                                                a{v s11U} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                                                    of
                                                                                                                    sat_s122{v} [lid]
                                                                                                                    {   -- lvs: [a{v s11U} [lid]
                                                                                                                                 a1{v s11X} [lid]
                                                                                                                                 sat_s13q{v} [lid]]; rhs lvs: [a1{v s11X} [lid]
                                                                                                                                                               sat_s13q{v} [lid]]; srt:SRT:[]
                                                                                                                      __DEFAULT ->
                                                                                                                          case
                                                                                                                              *##{v} [1.4041061592388573
                                                                                                                                      a1{v s11X} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                                                          of
                                                                                                                          sat_s121{v} [lid]
                                                                                                                          {   -- lvs: [a1{v s11X} [lid]
                                                                                                                                       sat_s122{v} [lid]
                                                                                                                                       sat_s13q{v} [lid]]; rhs lvs: [sat_s122{v} [lid]
                                                                                                                                                                     sat_s13q{v} [lid]]; srt:SRT:[]
                                                                                                                            __DEFAULT ->
                                                                                                                                case
                                                                                                                                    -##{v} [sat_s121{v} [lid]
                                                                                                                                            sat_s122{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                                                                of
                                                                                                                                sat_s13p{v} [lid]
                                                                                                                                {   -- lvs: [sat_s121{v} [lid]
                                                                                                                                             sat_s122{v} [lid]
                                                                                                                                             sat_s13q{v} [lid]]; rhs lvs: [sat_s13q{v} [lid]]; srt:SRT:[]
                                                                                                                                  __DEFAULT ->
                                                                                                                                      let {
                                                                                                                                        sat_s13r{v} [lid] =
                                                                                                                                            NO_CCS ghc-prim:GHC.Types.D#{(w) d 66}! [sat_s13p{v} [lid]];
                                                                                                                                      } in 
                                                                                                                                        base:Data.Complex.:+{d rk} [sat_s13r{v} [lid]
                                                                                                                                                                    sat_s13q{v} [lid]];
                                                                                                                                };
                                                                                                                          };
                                                                                                                    };
                                                                                                            };
                                                                                                      };
                                                                                                };
                                                                                          };
                                                                                    };
                                                                              };
                                                                        };
                                                                  };
                                                            };
                                                      };
                                                };
                                          };
                                    };
                              };
                        };
                  };
            };
    main:Main.main1{v rh} [gid] =
        [] \u srt:SRT:[(rf, main:Main.main5{v rf} [gid])] []
            base:GHC.List.iterateFB{v rg} [gid]
                main:Main.main5{v rf} [gid]
                main:Main.main4{v rd} [gid]
                main:Main.main2{v ri} [gid];
    main:Main.main{v r7} [gid] =
        [] \u srt:SRT:[(rh, main:Main.main1{v rh} [gid])] []
            main:Main.main1{v rh} [gid] 20;
    main:Main.main6{v r11a} [gid] =
        [] \r srt:SRT:[(r7, main:Main.main{v r7} [gid]),
                       (r8, base:GHC.TopHandler.runMainIO1{v r8} [gid])] [eta_B1{v} [lid]]
            base:GHC.TopHandler.runMainIO1{v r8} [gid]
                main:Main.main{v r7} [gid] eta_B1{v} [lid];
    main:Main.$wpointInFractalSet{v r6} [gid] =
        [] \r srt:SRT:[] [ww{v s12o} [lid] ww1{v s12r} [lid]]
            let {
              sat_s13G{v} [lid] =
                  [ww{v s12o} [lid]
                   ww1{v s12r} [lid]] \r srt:SRT:[] [x{v s12d} [lid]]
                      case
                          x{v s12d} [lid] :: Alg base:Data.Complex.Complex{tc rm}
                      of
                      w3{v s13C} [lid]
                      {   -- lvs: [x{v s12d} [lid]
                                   ww{v s12o} [lid]
                                   ww1{v s12r} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                 ww1{v s12r} [lid]]; srt:SRT:[]
                        base:Data.Complex.:+{d rk} ww6{v s12h} [lid] ww7{v s12k} [lid] ->
                            case
                                ww6{v s12h} [lid] :: Alg ghc-prim:GHC.Types.Double{(w) tc 3u}
                            of
                            ww8{v s13B} [lid]
                            {   -- lvs: [ww6{v s12h} [lid]
                                         ww7{v s12k} [lid]
                                         ww{v s12o} [lid]
                                         ww1{v s12r} [lid]]; rhs lvs: [ww7{v s12k} [lid]
                                                                       ww{v s12o} [lid]
                                                                       ww1{v s12r} [lid]]; srt:SRT:[]
                              ghc-prim:GHC.Types.D#{(w) d 66} ww9{v s12p} [lid] ->
                                  case
                                      ww7{v s12k} [lid] :: Alg ghc-prim:GHC.Types.Double{(w) tc 3u}
                                  of
                                  ww10{v s13A} [lid]
                                  {   -- lvs: [ww7{v s12k} [lid]
                                               ww{v s12o} [lid]
                                               ww9{v s12p} [lid]
                                               ww1{v s12r} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                             ww9{v s12p} [lid]
                                                                             ww1{v s12r} [lid]]; srt:SRT:[]
                                    ghc-prim:GHC.Types.D#{(w) d 66} ww11{v s12s} [lid] ->
                                        case
                                            *##{v} [ww1{v s12r} [lid]
                                                    ww11{v s12s} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                        of
                                        sat_s13z{v} [lid]
                                        {   -- lvs: [ww{v s12o} [lid]
                                                     ww9{v s12p} [lid]
                                                     ww1{v s12r} [lid]
                                                     ww11{v s12s} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                    ww9{v s12p} [lid]
                                                                                    ww1{v s12r} [lid]
                                                                                    ww11{v s12s} [lid]]; srt:SRT:[]
                                          __DEFAULT ->
                                              case
                                                  *##{v} [ww{v s12o} [lid]
                                                          ww9{v s12p} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                              of
                                              sat_s13y{v} [lid]
                                              {   -- lvs: [ww{v s12o} [lid]
                                                           ww9{v s12p} [lid]
                                                           ww1{v s12r} [lid]
                                                           ww11{v s12s} [lid]
                                                           sat_s13z{v} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                         ww9{v s12p} [lid]
                                                                                         ww1{v s12r} [lid]
                                                                                         ww11{v s12s} [lid]
                                                                                         sat_s13z{v} [lid]]; srt:SRT:[]
                                                __DEFAULT ->
                                                    case
                                                        -##{v} [sat_s13y{v} [lid]
                                                                sat_s13z{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                    of
                                                    sat_s13x{v} [lid]
                                                    {   -- lvs: [ww{v s12o} [lid]
                                                                 ww9{v s12p} [lid]
                                                                 ww1{v s12r} [lid]
                                                                 ww11{v s12s} [lid]
                                                                 sat_s13y{v} [lid]
                                                                 sat_s13z{v} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                               ww9{v s12p} [lid]
                                                                                               ww1{v s12r} [lid]
                                                                                               ww11{v s12s} [lid]]; srt:SRT:[]
                                                      __DEFAULT ->
                                                          case
                                                              expDouble#{v} [sat_s13x{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                          of
                                                          x1{v s12v} [lid]
                                                          {   -- lvs: [ww{v s12o} [lid]
                                                                       ww9{v s12p} [lid]
                                                                       ww1{v s12r} [lid]
                                                                       ww11{v s12s} [lid]
                                                                       sat_s13x{v} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                                     ww9{v s12p} [lid]
                                                                                                     ww1{v s12r} [lid]
                                                                                                     ww11{v s12s} [lid]]; srt:SRT:[]
                                                            __DEFAULT ->
                                                                case
                                                                    *##{v} [ww1{v s12r} [lid]
                                                                            ww9{v s12p} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                of
                                                                sat_s13w{v} [lid]
                                                                {   -- lvs: [ww{v s12o} [lid]
                                                                             ww9{v s12p} [lid]
                                                                             ww1{v s12r} [lid]
                                                                             ww11{v s12s} [lid]
                                                                             x1{v s12v} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                                          ww1{v s12r} [lid]
                                                                                                          ww11{v s12s} [lid]
                                                                                                          x1{v s12v} [lid]]; srt:SRT:[]
                                                                  __DEFAULT ->
                                                                      case
                                                                          *##{v} [ww{v s12o} [lid]
                                                                                  ww11{v s12s} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                      of
                                                                      sat_s13v{v} [lid]
                                                                      {   -- lvs: [ww{v s12o} [lid]
                                                                                   ww1{v s12r} [lid]
                                                                                   ww11{v s12s} [lid]
                                                                                   x1{v s12v} [lid]
                                                                                   sat_s13w{v} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                                                 ww1{v s12r} [lid]
                                                                                                                 x1{v s12v} [lid]
                                                                                                                 sat_s13w{v} [lid]]; srt:SRT:[]
                                                                        __DEFAULT ->
                                                                            case
                                                                                +##{v} [sat_s13v{v} [lid]
                                                                                        sat_s13w{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                            of
                                                                            ww2{v s12z} [lid]
                                                                            {   -- lvs: [ww{v s12o} [lid]
                                                                                         ww1{v s12r} [lid]
                                                                                         x1{v s12v} [lid]
                                                                                         sat_s13v{v} [lid]
                                                                                         sat_s13w{v} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                                                       ww1{v s12r} [lid]
                                                                                                                       x1{v s12v} [lid]]; srt:SRT:[]
                                                                              __DEFAULT ->
                                                                                  case
                                                                                      sinDouble#{v} [ww2{v s12z} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                  of
                                                                                  sat_s13u{v} [lid]
                                                                                  {   -- lvs: [ww{v s12o} [lid]
                                                                                               ww1{v s12r} [lid]
                                                                                               x1{v s12v} [lid]
                                                                                               ww2{v s12z} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                                                             ww1{v s12r} [lid]
                                                                                                                             x1{v s12v} [lid]
                                                                                                                             ww2{v s12z} [lid]]; srt:SRT:[]
                                                                                    __DEFAULT ->
                                                                                        case
                                                                                            *##{v} [x1{v s12v} [lid]
                                                                                                    sat_s13u{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                        of
                                                                                        a{v s12C} [lid]
                                                                                        {   -- lvs: [ww{v s12o} [lid]
                                                                                                     ww1{v s12r} [lid]
                                                                                                     x1{v s12v} [lid]
                                                                                                     ww2{v s12z} [lid]
                                                                                                     sat_s13u{v} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                                                                   ww1{v s12r} [lid]
                                                                                                                                   x1{v s12v} [lid]
                                                                                                                                   ww2{v s12z} [lid]]; srt:SRT:[]
                                                                                          __DEFAULT ->
                                                                                              case
                                                                                                  cosDouble#{v} [ww2{v s12z} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                              of
                                                                                              sat_s13t{v} [lid]
                                                                                              {   -- lvs: [ww{v s12o} [lid]
                                                                                                           ww1{v s12r} [lid]
                                                                                                           x1{v s12v} [lid]
                                                                                                           ww2{v s12z} [lid]
                                                                                                           a{v s12C} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                                                                       ww1{v s12r} [lid]
                                                                                                                                       x1{v s12v} [lid]
                                                                                                                                       a{v s12C} [lid]]; srt:SRT:[]
                                                                                                __DEFAULT ->
                                                                                                    case
                                                                                                        *##{v} [x1{v s12v} [lid]
                                                                                                                sat_s13t{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                                    of
                                                                                                    a1{v s12F} [lid]
                                                                                                    {   -- lvs: [ww{v s12o} [lid]
                                                                                                                 ww1{v s12r} [lid]
                                                                                                                 x1{v s12v} [lid]
                                                                                                                 a{v s12C} [lid]
                                                                                                                 sat_s13t{v} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                                                                               ww1{v s12r} [lid]
                                                                                                                                               a{v s12C} [lid]]; srt:SRT:[]
                                                                                                      __DEFAULT ->
                                                                                                          case
                                                                                                              *##{v} [ww1{v s12r} [lid]
                                                                                                                      a1{v s12F} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                                          of
                                                                                                          sat_s12Q{v} [lid]
                                                                                                          {   -- lvs: [ww{v s12o} [lid]
                                                                                                                       ww1{v s12r} [lid]
                                                                                                                       a{v s12C} [lid]
                                                                                                                       a1{v s12F} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                                                                                    ww1{v s12r} [lid]
                                                                                                                                                    a{v s12C} [lid]
                                                                                                                                                    a1{v s12F} [lid]]; srt:SRT:[]
                                                                                                            __DEFAULT ->
                                                                                                                case
                                                                                                                    *##{v} [ww{v s12o} [lid]
                                                                                                                            a{v s12C} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                                                of
                                                                                                                sat_s12P{v} [lid]
                                                                                                                {   -- lvs: [ww{v s12o} [lid]
                                                                                                                             ww1{v s12r} [lid]
                                                                                                                             a{v s12C} [lid]
                                                                                                                             a1{v s12F} [lid]
                                                                                                                             sat_s12Q{v} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                                                                                           ww1{v s12r} [lid]
                                                                                                                                                           a{v s12C} [lid]
                                                                                                                                                           a1{v s12F} [lid]
                                                                                                                                                           sat_s12Q{v} [lid]]; srt:SRT:[]
                                                                                                                  __DEFAULT ->
                                                                                                                      case
                                                                                                                          +##{v} [sat_s12P{v} [lid]
                                                                                                                                  sat_s12Q{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                                                      of
                                                                                                                      sat_s13s{v} [lid]
                                                                                                                      {   -- lvs: [ww{v s12o} [lid]
                                                                                                                                   ww1{v s12r} [lid]
                                                                                                                                   a{v s12C} [lid]
                                                                                                                                   a1{v s12F} [lid]
                                                                                                                                   sat_s12P{v} [lid]
                                                                                                                                   sat_s12Q{v} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                                                                                                 ww1{v s12r} [lid]
                                                                                                                                                                 a{v s12C} [lid]
                                                                                                                                                                 a1{v s12F} [lid]]; srt:SRT:[]
                                                                                                                        __DEFAULT ->
                                                                                                                            let {
                                                                                                                              sat_s13E{v} [lid] =
                                                                                                                                  NO_CCS ghc-prim:GHC.Types.D#{(w) d 66}! [sat_s13s{v} [lid]];
                                                                                                                            } in 
                                                                                                                              case
                                                                                                                                  *##{v} [ww1{v s12r} [lid]
                                                                                                                                          a{v s12C} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                                                              of
                                                                                                                              sat_s12K{v} [lid]
                                                                                                                              {   -- lvs: [ww{v s12o} [lid]
                                                                                                                                           ww1{v s12r} [lid]
                                                                                                                                           a{v s12C} [lid]
                                                                                                                                           a1{v s12F} [lid]
                                                                                                                                           sat_s13E{v} [lid]]; rhs lvs: [ww{v s12o} [lid]
                                                                                                                                                                         a1{v s12F} [lid]
                                                                                                                                                                         sat_s13E{v} [lid]]; srt:SRT:[]
                                                                                                                                __DEFAULT ->
                                                                                                                                    case
                                                                                                                                        *##{v} [ww{v s12o} [lid]
                                                                                                                                                a1{v s12F} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                                                                    of
                                                                                                                                    sat_s12J{v} [lid]
                                                                                                                                    {   -- lvs: [ww{v s12o} [lid]
                                                                                                                                                 a1{v s12F} [lid]
                                                                                                                                                 sat_s12K{v} [lid]
                                                                                                                                                 sat_s13E{v} [lid]]; rhs lvs: [sat_s12K{v} [lid]
                                                                                                                                                                               sat_s13E{v} [lid]]; srt:SRT:[]
                                                                                                                                      __DEFAULT ->
                                                                                                                                          case
                                                                                                                                              -##{v} [sat_s12J{v} [lid]
                                                                                                                                                      sat_s12K{v} [lid]] :: Prim ghc-prim:GHC.Prim.Double#{(w) tc 3r}
                                                                                                                                          of
                                                                                                                                          sat_s13D{v} [lid]
                                                                                                                                          {   -- lvs: [sat_s12J{v} [lid]
                                                                                                                                                       sat_s12K{v} [lid]
                                                                                                                                                       sat_s13E{v} [lid]]; rhs lvs: [sat_s13E{v} [lid]]; srt:SRT:[]
                                                                                                                                            __DEFAULT ->
                                                                                                                                                let {
                                                                                                                                                  sat_s13F{v} [lid] =
                                                                                                                                                      NO_CCS ghc-prim:GHC.Types.D#{(w) d 66}! [sat_s13D{v} [lid]];
                                                                                                                                                } in 
                                                                                                                                                  base:Data.Complex.:+{d rk} [sat_s13F{v} [lid]
                                                                                                                                                                              sat_s13E{v} [lid]];
                                                                                                                                          };
                                                                                                                                    };
                                                                                                                              };
                                                                                                                      };
                                                                                                                };
                                                                                                          };
                                                                                                    };
                                                                                              };
                                                                                        };
                                                                                  };
                                                                            };
                                                                      };
                                                                };
                                                          };
                                                    };
                                              };
                                        };
                                  };
                            };
                      };
            } in 
              base:GHC.List.iterate{v rl} [gid]
                  sat_s13G{v} [lid] main:Main.main2{v ri} [gid];
    main:Main.pointInFractalSet{v rgw} [gid] =
        [] \r srt:SRT:[] [w{v s12U} [lid]]
            case
                w{v s12U} [lid] :: Alg base:Data.Complex.Complex{tc rm}
            of
            w1{v s13J} [lid]
            {   -- lvs: [w{v s12U} [lid]]; rhs lvs: []; srt:SRT:[]
              base:Data.Complex.:+{d rk} ww{v s12Y} [lid] ww1{v s131} [lid] ->
                  case
                      ww{v s12Y} [lid] :: Alg ghc-prim:GHC.Types.Double{(w) tc 3u}
                  of
                  ww2{v s13I} [lid]
                  {   -- lvs: [ww{v s12Y} [lid]
                               ww1{v s131} [lid]]; rhs lvs: [ww1{v s131} [lid]]; srt:SRT:[]
                    ghc-prim:GHC.Types.D#{(w) d 66} ww3{v s134} [lid] ->
                        case
                            ww1{v s131} [lid] :: Alg ghc-prim:GHC.Types.Double{(w) tc 3u}
                        of
                        ww4{v s13H} [lid]
                        {   -- lvs: [ww1{v s131} [lid]
                                     ww3{v s134} [lid]]; rhs lvs: [ww3{v s134} [lid]]; srt:SRT:[]
                          ghc-prim:GHC.Types.D#{(w) d 66} ww5{v s135} [lid] ->
                              main:Main.$wpointInFractalSet{v r6} [gid]
                                  ww3{v s134} [lid] ww5{v s135} [lid];
                        };
                  };
            };
    main::Main.main{v 0T} [gid] =
        [] \r srt:SRT:[(r11a,
                        main:Main.main6{v r11a} [gid])] [eta_B1{v} [lid]]
            main:Main.main6{v r11a} [gid] eta_B1{v} [lid];
    *** End of Offense ***

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Also when this program compiled via llvm it produces segfault

$ ghc -O Test.hs -fforce-recomp -fllvm
$ ./Test >/dev/null
Segmentation fault

Change History (3)

comment:1 Changed 3 years ago by sergv

  • Cc serg.foo@… added

comment:2 Changed 3 years ago by simonpj@…

commit 773884a08e0906f1a2c0d8c9c36b1782ffb9f5ea

Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Wed Jul 27 08:45:53 2011 +0100

    Improve StgLint -- a bit
    
    This addresses Trac #5345, but only partially.  Fundamentally STG Lint
    is impossible, because unsafeCoerce# can randomise all the types.
    
    This patch does a bit of fiddle faddling in StgLint which makes it
    a bit better, but it's a losing battle. Trac #5345 works though, FWIW.

 compiler/stgSyn/StgLint.lhs   |  191 +++++++++++++++++++++++++----------------
 compiler/typecheck/TcType.lhs |    2 +-
 compiler/types/Type.lhs       |   53 ++++++++---
 3 files changed, 157 insertions(+), 89 deletions(-)

comment:3 Changed 3 years ago by simonpj

  • Resolution set to fixed
  • Status changed from new to closed

Partial fix done. I have not even added a test because STG lint is so dodgy.

Note: See TracTickets for help on using tickets.