Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 3,615
    • Issues 3,615
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 198
    • Merge Requests 198
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #7041

Closed
Open
Opened Jul 02, 2012 by Bertram Felgenhauer@int-e
  • Report abuse
  • New issue
Report abuse New issue

GHC.Real.gcdInt is no longer optimized.

This is a regression since ghc-7.2, related to #5767 (closed). GHC.Real defines

gcdInt :: Int -> Int -> Int
gcdInt a b = fromIntegral (gcdInteger (fromIntegral a) (fromIntegral b))

which used to optimize to GHC.Integer.Type.gcdInt. But since fromInteger = integerToInt and fromIntegral = smallInteger are no longer inlined, this optimization is lost. This results in unecessary allocations.

Trac metadata
Trac field Value
Version 7.5
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture

Related issues

  • Discussion
  • Designs
Assignee
Assign to
7.6.1
Milestone
7.6.1
Assign milestone
Time tracking
None
Due date
None
4
Labels
bug core libraries P::high Trac import
Assign labels
  • View project labels
Reference: ghc/ghc#7041