Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,253
    • Issues 4,253
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 394
    • Merge Requests 394
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #5614

Closed
Open
Opened Nov 09, 2011 by gmi001@trac-gmi001

recompilation bug with -O

Recompilation with -O should also rebuild Main.hs in the attached test application consisting of Main.hs and X.hs.

Test case:

  1. build the app with GHC --make -O Main.hs

  2. run Main (output = B)

  3. change and save in X.hs

x = D { f = B }

to

x = D { f = A }

  1. rebuild the app with GHC --make -O Main.hs (recompiles only X.hs)

  2. run Main (unexpected output = B)

  3. force recompilation of both X.hs and Main.hs

  4. run Main (output = A)

The bug is in -O. A similar test with f :: String instead of f :: D2 runs without problems.

Problem is tested positive on WIN GHC 7.0.2, OpenSuse GHC 6.12.3, Mac OS X GHC 7.0.3 and GHC 7.2.1 (MAC?).

for more detail see http://sourceforge.net/apps/trac/ampersand/ticket/172.

the closed #1959 (closed) and #3166 (closed) describe similar problems.

Trac metadata
Trac field Value
Version 7.2.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
7.4.1
Milestone
7.4.1
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#5614