-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate definitions in generated C #203
Comments
Also the function I introduced that calls
|
I guess it probably has something to do with the return type. Do you mean to use |
Should be a fairly minimal example |
What it's doing is it does one round of monomorphisation, specialising internal_error and internal_error_caller, then it does a second round because the call to internal_error within internal_error_caller can now be monomorphised within the body of the specialised internal_error_caller producing the duplicate definition. |
Should be fixed by 21314bc |
Thanks! Re. the throw at the end of |
I can confirm it now compiles! |
If this is needed for the RISC-V spec would it make sense to do a 0.15.1 point release? |
It is blocking the merge of the above PR so yes please. There are also some fixes to SMT I'd like to have in a release :-) |
FYI 444132c causes lots of warnings in the RISC-V model. I'm not sure how to fix those so it would be good to check that they are indeed valid warnings before releasing the fix. |
I made that warning one that only prints at most once so it prints less often. I think most of the issues in the RISC-V spec are valid warnings though. I fixed an issue with spurious warnings for mappings, but the definitions in https://github.com/riscv/sail-riscv/blob/master/model/prelude_mapping.sail are in the wrong order to do what I think is intended so the warnings for those are valid. |
I will see about making a pull request to fix that file |
…_manifest, sail_lem_backend, sail_latex_backend, sail_doc_backend, sail_coq_backend, sail_c_backend, sail and libsail (0.16) CHANGES: ##### New documentation backend A new documentation backend for integrating with Asciidoctor has been added. ##### Automatic formatting (EXPERIMENTAL) The `sail -fmt` option can be used to automatically format Sail source. This currently misses some features and can produce ugly output in some known cases, so is not ready for serious usage yet. ##### Fixes Various bugfixes including: * Issue 203: rems-project/sail#203 * Issue 202: rems-project/sail#202 * Issue 188: rems-project/sail#188 * Issue 187: rems-project/sail#187 * Issue 277: rems-project/sail#277 Various mapping issues such as: * Issue 244: rems-project/sail#244 As well as other minor issues The `val cast` syntax and support for implict casts is now entirely removed, as mentioned in the previous release changes. The flags are still allowed (to avoid breaking Makefiles) but no longer do anything. The pattern completeness checker has been improved and is now context sensitive in some cases.
…_manifest, sail_lem_backend, sail_latex_backend, sail_doc_backend, sail_coq_backend, sail_c_backend, sail and libsail (0.16) CHANGES: ##### New documentation backend A new documentation backend for integrating with Asciidoctor has been added. ##### Automatic formatting (EXPERIMENTAL) The `sail -fmt` option can be used to automatically format Sail source. This currently misses some features and can produce ugly output in some known cases, so is not ready for serious usage yet. ##### Fixes Various bugfixes including: * Issue 203: rems-project/sail#203 * Issue 202: rems-project/sail#202 * Issue 188: rems-project/sail#188 * Issue 187: rems-project/sail#187 * Issue 277: rems-project/sail#277 Various mapping issues such as: * Issue 244: rems-project/sail#244 As well as other minor issues The `val cast` syntax and support for implict casts is now entirely removed, as mentioned in the previous release changes. The flags are still allowed (to avoid breaking Makefiles) but no longer do anything. The pattern completeness checker has been improved and is now context sensitive in some cases.
When attempting to compile the current version of this PR: riscv/sail-riscv#197 I get an error when compiling the C file generated by Sail:
I've not been able to reproduce in a smaller example yet. I suspect it is something to do with the interesting type of
internal_error
:The text was updated successfully, but these errors were encountered: