Opened 4 years ago

Closed 3 years ago

#4396 closed bug (fixed)

tc003(hpc) failing with link error

Reported by: simonmar Owned by:
Priority: highest Milestone: 7.0.1
Component: Compiler (Type checker) Version: 7.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: tc003(hpc) Blocked By:
Blocking: Related Tickets:

Description

=====> tc003(hpc) 1980 of 2622 [0, 37, 0]
cd ./typecheck/should_compile && '/64playpen/simonmar/nightly/HEAD-cam-04-unx/x86_64-unknown-linux/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-conf -rtsopts  -c tc003.hs -O -fhpc  -fno-warn-incomplete-patterns >tc003.comp.stderr 2>&1
Compile failed (status 256) errors were:
/tmp/ghc14267_0/ghc14267_0.s: Assembler messages:

/tmp/ghc14267_0/ghc14267_0.s:173:0:
     Error: symbol `ShouldSucceed_e_closure' is already defined

/tmp/ghc14267_0/ghc14267_0.s:196:0:
     Error: symbol `ShouldSucceed_e_info' is already defined

/tmp/ghc14267_0/ghc14267_0.s:237:0:
     Error: symbol `ShouldSucceed_d_closure' is already defined

/tmp/ghc14267_0/ghc14267_0.s:260:0:
     Error: symbol `ShouldSucceed_d_info' is already defined

*** unexpected failure for tc003(hpc)

Apparently the simplifier is generating multiple bindings for d and e. (Core Lint ought to check for this too).

Change History (3)

comment:1 Changed 4 years ago by simonpj

  • Status changed from new to merge
  • Test Case set to tc003(hpc)

Fixed by

Thu Oct 21 18:03:24 BST 2010  simonpj@microsoft.com
  * Fix Trac #4396, by localising pattern binders in the desugarer
  
  See Note [Localise pattern binders]

    M ./compiler/deSugar/DsUtils.lhs -5 +43

Also I improved Lint to catch the error earlier:

Fri Oct 22 08:24:05 BST 2010  simonpj@microsoft.com
  * Lint should check for duplicate top-level bindings with same qualified name
  
  This would have produced a more civilised error for Trac #4396

    M ./compiler/coreSyn/CoreLint.lhs -11 +29

Simon

comment:2 Changed 4 years ago by igloo

First patch merged. Second makes T1969 fail:

=====> T1969(normal) 1 of 2 [0, 0, 0]
cd . && '/home/ian/ghc/7.0-branch/ghc/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-conf -rtsopts  -c T1969.hs   +RTS -V0 -tT1969.comp.stats --machine-readable -RTS  >T1969.comp.stderr 2>&1
bytes allocated 1035366872 is more than maximum allowed 550000000
*** unexpected failure for T1969(normal)

comment:3 Changed 3 years ago by igloo

  • Resolution set to fixed
  • Status changed from merge to closed

Second now merged too, along with

Tue Oct 26 22:15:46 BST 2010  Ian Lynagh <igloo@earth.li>
  * Use removeDups to find top-level duplicate names
  findDupsEq is quadratic, whereas removeDups is n log n.
  Fixes T1969 regression.
Note: See TracTickets for help on using tickets.