[GHC] #6132: Can't use both shebang line and #ifdef declarations in the same file.

GHC ghc-devs at haskell.org
Sun Jun 12 10:08:47 UTC 2016


#6132: Can't use both shebang line and #ifdef declarations in the same file.
-------------------------------------+-------------------------------------
        Reporter:  gfxmonk           |                Owner:
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.0.4
  (Parser)                           |
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:  runghc/T6132
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by mpickering):

 This test always fails for me on OSX.

 {{{
 =====> T6132(normal) 4 of 4 [0, 0, 0]
 cd "/var/folders/3z/_vqy7kmx4pd90sg_v80zpk340000gn/T/ghctest-UHP1ob/test
 spaces/1/2/3/./T6132" &&  "/Users/matt/Documents/haskell/ghc/inplace/test
 spaces/ghc-stage2" -c T6132.hs -fforce-recomp -dcore-lint -dcmm-lint -dno-
 debug-output -no-user-package-db -rtsopts -fno-warn-tabs -fno-warn-missed-
 specialisations -fshow-warning-groups -fno-ghci-history   >
 T6132.comp.stderr 2>&1
 Compile failed (status 256) errors were:

 T6132.hs:1:2: error: parse error on input ‘#!/’
 }}}

 Result of `--info`

 {{{
 [("Project name","The Glorious Glasgow Haskell Compilation System")
  ,("GCC extra via C opts"," -fwrapv -fno-builtin")
  ,("C compiler command","gcc")
  ,("C compiler flags"," -m64 -fno-stack-protector")
  ,("C compiler link flags"," -m64")
  ,("Haskell CPP command","gcc")
  ,("Haskell CPP flags","-E -undef -traditional -Wno-invalid-pp-token -Wno-
 unicode -Wno-trigraphs")
  ,("ld command","/usr/bin/ld")
  ,("ld flags"," -arch x86_64")
  ,("ld supports compact unwind","YES")
  ,("ld supports build-id","NO")
  ,("ld supports filelist","YES")
  ,("ld is GNU ld","NO")
  ,("ar command","/usr/bin/ar")
  ,("ar flags","clqs")
  ,("ar supports at file","NO")
  ,("touch command","touch")
  ,("dllwrap command","/bin/false")
  ,("windres command","/bin/false")
  ,("libtool command","libtool")
  ,("perl command","/usr/bin/perl")
  ,("cross compiling","NO")
  ,("target os","OSDarwin")
  ,("target arch","ArchX86_64")
  ,("target word size","8")
  ,("target has GNU nonexec stack","False")
  ,("target has .ident directive","True")
  ,("target has subsections via symbols","True")
  ,("Unregisterised","NO")
  ,("LLVM llc command","llc")
  ,("LLVM opt command","opt")
  ,("Project version","8.1.20160611")
  ,("Project Git commit id","5895f5c51c36d445360ced3af61a650cfb1ad899")
  ,("Booter version","8.0.1")
  ,("Stage","2")
  ,("Build platform","x86_64-apple-darwin")
  ,("Host platform","x86_64-apple-darwin")
  ,("Target platform","x86_64-apple-darwin")
  ,("Have interpreter","YES")
  ,("Object splitting supported","YES")
  ,("Have native code generator","YES")
  ,("Support SMP","YES")
  ,("Tables next to code","YES")
  ,("RTS ways","l debug thr thr_debug thr_l  dyn debug_dyn thr_dyn
 thr_debug_dyn l_dyn thr_l_dyn")
  ,("RTS expects libdw","NO")
  ,("Support dynamic-too","YES")
  ,("Support parallel --make","YES")
  ,("Support reexported-modules","YES")
  ,("Support thinning and renaming package flags","YES")
  ,("Requires unified installed package IDs","YES")
  ,("Uses package keys","YES")
  ,("Uses unit IDs","YES")
  ,("Dynamic by default","NO")
  ,("GHC Dynamic","YES")
  ,("GHC Profiled","NO")
  ,("Leading underscore","YES")
  ,("Debug on","False")
  ,("LibDir","/Users/matt/Documents/haskell/ghc/inplace/lib")
  ,("Global Package
 DB","/Users/matt/Documents/haskell/ghc/inplace/lib/package.conf.d")
  ]
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/6132#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list