[GHC] #12207: CgStaticPointers fails with -O

#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: | Operating System: Unknown/Multiple StaticPointers | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: codeGen/should_run/CgStaticPointers| Blocking: | Related Tickets: #11656 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{ $ make TEST=CgStaticPointers slow }}} {{{ Wrong exit code (expected 0 , actual 1 ) Stdout: Stderr: CgStaticPointers: couldn't find StaticPtrInfo {spInfoUnitId = "main", spInfoModuleName = "Main", spInfoSrcLoc = (13,21)} CallStack (from HasCallStack): error, called at CgStaticPointers.hs:25:14 in main:Main *** unexpected failure for CgStaticPointers(optasm) }}} This seems to be caused by the patch for #11656 (36d29f7ce332a2b1fbc36de831b0eef7a6405555). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12207 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * priority: normal => high Comment: `GcStaticPointers` and `ListStaticPointers` also also failing for `opt_ways`, but with a different error: {{{ Stderr: GcStaticPointers: user error (Pattern match failure in do expression at GcStaticPointers.hs:29:3-8) }}} `TcStaticPointers01` and `TcStaticPointers02` are failing for `WAY=hpc` with core lint errors: {{{ TcStaticPointers01.hs:14:1: warning: [RHS of f2 :: StaticPtr (Bool -> Bool -> Bool)] Found StaticPtr nested in an expression: StaticPtr @ (Bool -> Bool -> Bool) 12401500612696308948## 14493004878027643444## f2_s1BX f2_s1C3 }}} All four tests pass with ghc-7.10.3 and ghc-8.0.1. Raising priority. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12207#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12207: CgStaticPointers fails with -O
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
Type: bug | Status: new
Priority: high | Milestone:
Component: Compiler | Version: 8.1
(CodeGen) | Keywords:
Resolution: | StaticPointers
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| codeGen/should_run/CgStaticPointers
Blocked By: | Blocking:
Related Tickets: #11656 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Thomas Miedema

#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by facundo.dominguez): @thomie, thanks for reporting this. Will take a look. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12207#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by facundo.dominguez): `CgStaticPointers` and `ListStaticPointers` seem to fail only when compiled with `-O`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12207#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * cc: simonpj (added) Comment: With `-O` the `FloatOut` pass places the `StaticPtr` applications at the top level as expected: {{{ lvl_s4Ke lvl_s4Ke = StaticPtr 4472709404834582951## 17755048586376966233## lvl_s4Kc lvl_s4Kd ... staticKey lvl_s4Ke ... }}} However some other core-to-core pass is simplifying `staticKey lvl_s4Ke` and replacing it with `Fingerprint 4472709404834582951## 17755048586376966233##`. This is alright but it also removes the `lvl_s4Ke` binding! Which then cannot be added to the SPT. Any pointers to the code which removes the binding? My first attempt would be to make a special case for bindings to `StaticPtr` applications so they are not removed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12207#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: | facundo.dominguez Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * owner: => facundo.dominguez -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12207#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: | facundo.dominguez Type: bug | Status: patch Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Phab:D2355 Wiki Page: | -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * status: new => patch * differential: => Phab:D2355 Comment: Just submitted a patch to fix the tests failing with `-fhpc`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12207#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12207: CgStaticPointers fails with -O
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
| facundo.dominguez
Type: bug | Status: patch
Priority: high | Milestone:
Component: Compiler | Version: 8.1
(CodeGen) | Keywords:
Resolution: | StaticPointers
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| codeGen/should_run/CgStaticPointers
Blocked By: | Blocking:
Related Tickets: #11656 | Differential Rev(s): Phab:D2355
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Facundo Domínguez

#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: | facundo.dominguez Type: bug | Status: patch Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Phab:D2355 Wiki Page: | Phab:D2366 -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * differential: Phab:D2355 => Phab:D2355 Phab:D2366 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12207#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12207: CgStaticPointers fails with -O
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
| facundo.dominguez
Type: bug | Status: patch
Priority: high | Milestone:
Component: Compiler | Version: 8.1
(CodeGen) | Keywords:
Resolution: | StaticPointers
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| codeGen/should_run/CgStaticPointers
Blocked By: | Blocking:
Related Tickets: #11656 | Differential Rev(s): Phab:D2355
Wiki Page: | Phab:D2366
-------------------------------------+-------------------------------------
Comment (by Facundo Domínguez

#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: | facundo.dominguez Type: bug | Status: closed Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: fixed | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Phab:D2355 Wiki Page: | Phab:D2366 -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12207#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC