Opened 6 years ago

Closed 8 months ago

#3376 closed bug (worksforme)

hpc and CPP don't mix on Windows

Reported by: igloo Owned by: andy@…
Priority: lowest Milestone: 7.10.1
Component: Code Coverage Version: 6.10.4
Keywords: Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

Originaly reported by Dominic Steinitz here: http://www.haskell.org/pipermail/glasgow-haskell-users/2009-July/017511.html

On Windows, with these files:

CommonHPC.hs:

module Main (main) where

import Common

main = do
  test
  test

test = do
  putStrLn $ show $ fact 4
  putStrLn $ show $ fact 5

Common.hs:

module Common (fact) where

fact 0 = 1
fact n = n * fact (n-1)

This works:

$ ghc -fhpc --make CommonHPC
$ ./CommonHPC
$ cat CommonHPC.exe.tix
Tix [ TixModule "Main" 693125724 18 [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], TixModule "Common" 4136915291 8 [2,9,9,9,9,9,9,11]]

but with -cpp we get no ticks for Common:

$ ghc -fhpc --make CommonHPC -cpp
$ ./CommonHPC
$ cat CommonHPC.exe.tix
Tix [ TixModule "Main" 693125724 18 [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], TixModule "Common" 3370079577 0 []]

Change History (10)

comment:1 Changed 6 years ago by igloo

  • Milestone changed from 6.12.1 to 6.12 branch
  • Type of failure set to None/Unknown

comment:2 Changed 5 years ago by igloo

  • Milestone changed from 6.12 branch to 6.12.3

comment:3 Changed 5 years ago by igloo

  • Milestone changed from 6.12.3 to 6.14.1
  • Priority changed from normal to low

comment:4 Changed 5 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:5 Changed 4 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:6 Changed 4 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:7 Changed 3 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from low to lowest

comment:8 Changed 3 years ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:9 Changed 12 months ago by thoughtpolice

  • Milestone changed from 7.6.2 to 7.10.1

Moving to 7.10.1.

comment:10 Changed 8 months ago by gintas

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

This is probably obsolete, seems to work here with GHC 7.8.1 (Haskell Platform 2014.02).

$ ghc -fhpc --make CommonHPC -cpp
[1 of 2] Compiling Common           ( Common.hs, Common.o ) [flags changed]
[2 of 2] Compiling Main             ( CommonHPC.hs, CommonHPC.o ) [flags changed]
Linking CommonHPC.exe ...

$ ./CommonHPC
24
120
24
120

$ cat CommonHPC.exe.tix
Tix [ TixModule "Main" 172773183 18 [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], TixModule "Common" 2159774738 8 [2,9,9,9,9,9,9,11]]
Note: See TracTickets for help on using tickets.