Ticket #7446 (closed bug: duplicate)

Opened 6 months ago

Last modified 6 months ago

GHC -O0 goes into a loop

Reported by: EyalLotem Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.1
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

-O1/-O2 don't loop.

If I remove some of the types or the UNPACK, the problem ceases to reproduce.

It does not reproduce on 7.4.1 or 7.0.4.

Reproduces on multiple machines with 7.6.1.

Attachments

Data.hs Download (42 bytes) - added by EyalLotem 6 months ago.
Reproduces the bug

Change History

Changed 6 months ago by EyalLotem

Reproduces the bug

Changed 6 months ago by EyalLotem

This also sends ghc7.6.1 -O0 into a loop:

data V = V {-# UNPACK #-} !V

But is of course illegal. The attached example:

data V = V {-# UNPACK #-} !L data L = L V

should be legal and also sends ghc into a loop.

Changed 6 months ago by int-e

Note that the second example,

data V = V {-# UNPACK #-} !L
data L = L V 

produces an "unusable UNPACK pragma" warning (but not always, see #7447) if compiled with -O1 or -O2. This also seems wrong -- I would expect the compiler to unpack it into something isomorphic to data V = V V.

P.S. reproduced on x86_64.

Changed 6 months ago by maxtaldykin

possible duplicate #7310

Changed 6 months ago by EyalLotem

  • status changed from new to closed
  • resolution set to duplicate

It is a duplicate indeed.

Note: See TracTickets for help on using tickets.