GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:16:17Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/14613Validate Failure On OSX -- implicit fall through error for machO linker suppo...2019-07-07T18:16:17ZCarter SchonwaldValidate Failure On OSX -- implicit fall through error for machO linker support (master == ghc8.5)seems like validate for OSX needs some TLC, heres a bug from the linker code that maybe could use an eyeball or two. Phyx suggests someone familiar with the code base could simply do
` __attribute__ ((fallthrough)); `, which is allegedly...seems like validate for OSX needs some TLC, heres a bug from the linker code that maybe could use an eyeball or two. Phyx suggests someone familiar with the code base could simply do
` __attribute__ ((fallthrough)); `, which is allegedly also supported by clang?
```
"inplace/bin/ghc-stage1" -optc-fno-stack-protector -optc-Wall -optc-Werror -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Wundef -optc-Iincludes -optc-Iincludes/dist -optc-Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-ghcconstants/header -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS -optc-fno-strict-aliasing -optc-fno-common -optc-DDTRACE -optc-Irts/dist/build/./autogen -optc-Wno-error=inline -optc-O2 -optc-fomit-frame-pointer -optc-g -optc-DDYNAMIC -optc-DRtsWay=\"rts_dyn\" -fPIC -dynamic -O0 -H64m -Wall -fllvm-fill-undef-with-garbage -Werror -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -this-unit-id rts -dcmm-lint -DDTRACE -i -irts -irts/dist/build -Irts/dist/build -irts/dist/build/./autogen -Irts/dist/build/./autogen -O2 -Wcpp-undef -Wnoncanonical-monad-instances -c rts/posix/GetTime.c -o rts/dist/build/posix/GetTime.dyn_o
rts/linker/MachO.c: In function 'ocGetNames_MachO':
rts/linker/MachO.c:1532:17: error:
error: this statement may fall through [-Werror=implicit-fallthrough=]
secArray[i].info->relocation_info
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
= (MachORelocationInfo*)(oc->image + section->reloff);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
1532 | = (MachORelocationInfo*)(oc->image + section->reloff);
| ^
rts/linker/MachO.c:1534:13: error:
note: here
default: {
^~~~~~~
|
1534 | default: {
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------- |
| Version | 8.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Linking) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | erikd@mega-nerd.com |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Validate Failure On OSX -- implicit fall through error for machO linker support (master == ghc8.5)","status":"New","operating_system":"","component":"Compiler (Linking)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["erikd@mega-nerd.com"],"type":"Bug","description":"seems like validate for OSX needs some TLC, heres a bug from the linker code that maybe could use an eyeball or two. Phyx suggests someone familiar with the code base could simply do \r\n` __attribute__ ((fallthrough)); `, which is allegedly also supported by clang?\r\n\r\n{{{\r\n\r\n\"inplace/bin/ghc-stage1\" -optc-fno-stack-protector -optc-Wall -optc-Werror -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Wundef -optc-Iincludes -optc-Iincludes/dist -optc-Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-ghcconstants/header -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS -optc-fno-strict-aliasing -optc-fno-common -optc-DDTRACE -optc-Irts/dist/build/./autogen -optc-Wno-error=inline -optc-O2 -optc-fomit-frame-pointer -optc-g -optc-DDYNAMIC -optc-DRtsWay=\\\"rts_dyn\\\" -fPIC -dynamic -O0 -H64m -Wall -fllvm-fill-undef-with-garbage -Werror -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -this-unit-id rts -dcmm-lint -DDTRACE -i -irts -irts/dist/build -Irts/dist/build -irts/dist/build/./autogen -Irts/dist/build/./autogen -O2 -Wcpp-undef -Wnoncanonical-monad-instances -c rts/posix/GetTime.c -o rts/dist/build/posix/GetTime.dyn_o\r\nrts/linker/MachO.c: In function 'ocGetNames_MachO':\r\n\r\nrts/linker/MachO.c:1532:17: error:\r\n error: this statement may fall through [-Werror=implicit-fallthrough=]\r\n secArray[i].info->relocation_info\r\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n = (MachORelocationInfo*)(oc->image + section->reloff);\r\n ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n |\r\n1532 | = (MachORelocationInfo*)(oc->image + section->reloff);\r\n | ^\r\n\r\nrts/linker/MachO.c:1534:13: error:\r\n note: here\r\n default: {\r\n ^~~~~~~\r\n |\r\n1534 | default: {\r\n\r\n\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/15932DeriveFunctor and GeneralizedNewtypeDeriving instances never reporting as cov...2021-03-04T08:53:07ZdaveanDeriveFunctor and GeneralizedNewtypeDeriving instances never reporting as coveredWhen testing coverage of test cases, HPC does not report some instances as receiving coverage even though it seems they are. Particularly, when one hand derives the functions they show full coverage. The specific instances in question ap...When testing coverage of test cases, HPC does not report some instances as receiving coverage even though it seems they are. Particularly, when one hand derives the functions they show full coverage. The specific instances in question appear to be ones derived via DeriveFunctor and GeneralizedNewtypeDeriving. Problems have been observed with at least Functor, Applicative, and Monad.
A minimal example is attached, and available as a cabal project at https://code.xkrd.net/davean/minimal-coverage-test. To reproduce, run "cabal v2-test --enable-coverage" and view the resulting coverage HTML files.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------- |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | low |
| Resolution | Unresolved |
| Component | Code Coverage |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"DeriveFunctor and GeneralizedNewtypeDeriving instances never reporting as covered","status":"New","operating_system":"","component":"Code Coverage","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"When testing coverage of test cases, HPC does not report some instances as receiving coverage even though it seems they are. Particularly, when one hand derives the functions they show full coverage. The specific instances in question appear to be ones derived via DeriveFunctor and GeneralizedNewtypeDeriving. Problems have been observed with at least Functor, Applicative, and Monad.\r\n\r\nA minimal example is attached, and available as a cabal project at https://code.xkrd.net/davean/minimal-coverage-test. To reproduce, run \"cabal v2-test --enable-coverage\" and view the resulting coverage HTML files.","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3Javran ChengJavran Chenghttps://gitlab.haskell.org/ghc/ghc/-/issues/15917GHC seems to re-read source of module to produce fancy error msgs2024-02-20T20:54:05ZHeimdellGHC seems to re-read source of module to produce fancy error msgsI had a module with unused name `txFees` in it. I started compilation and in the same time edited code by renaming `txFees` -\> `_txFees`.
I got the following message:
```
warning: [-Wunused-matches]
Defined but not used: ‘...I had a module with unused name `txFees` in it. I started compilation and in the same time edited code by renaming `txFees` -\> `_txFees`.
I got the following message:
```
warning: [-Wunused-matches]
Defined but not used: ‘txFees’
|
40 | } _txFees
| ^^^^^^
<no location info>: error:
Failing due to -Werror.
```
The screenshot is in the attachment. Notice that message part is about old code (`txFees`), and preview is about new code (`_txFees`).
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.2.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | lowest |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | @int-index |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHC seems to re-read source of module to produce fancy error msgs","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.2.2","keywords":["re-reading"],"differentials":[],"test_case":"","architecture":"","cc":["@int-index"],"type":"Bug","description":"I had a module with unused name `txFees` in it. I started compilation and in the same time edited code by renaming `txFees` -> `_txFees`.\r\n\r\nI got the following message:\r\n\r\n{{{\r\n warning: [-Wunused-matches]\r\n Defined but not used: ‘txFees’\r\n |\r\n 40 | } _txFees\r\n | ^^^^^^\r\n \r\n <no location info>: error: \r\n Failing due to -Werror.\r\n}}}\r\n\r\nThe screenshot is in the attachment. Notice that message part is about old code (`txFees`), and preview is about new code (`_txFees`).","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3