Skip to content
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

C++ backend: Cannot iterate over arrays of bool, sometimes #69

Open
rixed opened this issue Jun 14, 2022 · 0 comments
Open

C++ backend: Cannot iterate over arrays of bool, sometimes #69

rixed opened this issue Jun 14, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@rixed
Copy link
Owner

rixed commented Jun 14, 2022

 [17 / 116] >>src/DessserQCheck.ml:926                                         In file included from src/dessser/runtime.h:15,                                                
                 from /tmp/dessser_dessser_test_52644ff8.cc:23:                        
src/dessser/Arr.h: In instantiation of ‘dessser::Arr<T>::Arr(TInit, std::function<T(TInit, T2)>, dessser::Arr<T2>) [with TInit = dessser::Void; T2 = bool; T = bool]’:        
/tmp/dessser_dessser_test_52644ff8.cc:1094:99:   required from here                                                                                                           
src/dessser/Arr.h:55:5: error: cannot bind non-const lvalue reference of type ‘bool&’ to an rvalue of type ‘bool’                                                             
   55 |     for (T2 &x2 : that) {                                                                                                                                             
      |     ^~~                                                                                                                                                               
In file included from /usr/include/c++/10/vector:68,                                                                                                                          
                 from /usr/include/c++/10/functional:62,                                                                                                                      
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,                                                                                                      
                 from /usr/include/c++/10/algorithm:74,                                
                 from /tmp/dessser_dessser_test_52644ff8.cc:7:                                                                                                                
/usr/include/c++/10/bits/stl_bvector.h:86:5: note:   after user-defined conversion: ‘std::_Bit_reference::operator bool() const’                                              
   86 |     operator bool() const _GLIBCXX_NOEXCEPT                                                                                                                           
      |     ^~~~~~~~                                                                                                                                                          
cc1plus: note: unrecognized command-line option ‘-Wno-unused-lambda-capture’ may have been intended to silence earlier diagnostics                                            
 [18 / 116] >>src/DessserQCheck.ml:983                                         FAILURE: Failure("g++ -std=c++17 -g -O0 -W -Wall -Wno-unused-parameter -Wno-unused-variable -Wn
o-shift-negative-value -Wno-unused-lambda-capture -iquote src -iquote /tmp  \"/tmp/dessser_dessser_test_52644ff8.cc\" -o \"/tmp/dessser_dessser_test_52644ff8.x\" failed with 
code 1\n"):                                                                                                                                                                   
Raised at file "stdlib.ml", line 33, characters 17-33                                                                                                                         
Called from file "src/DessserBackEndCPP.ml", line 2017, characters 2-13                                                                                                       
Called from file "src/DessserQCheck.ml", line 927, characters 14-34                                                                                                           
Called from file "list.ml", line 106, characters 12-15                                                                                                                        
Called from file "src/DessserQCheck.ml", line 935, characters 4-127                                                                                                           
                                                                                                                                                                              
/usr/bin/timeout: Fatal error: exception File "src/DessserOCamlBackEndHelpers.ml", line 362, characters 4-10: Assertion failed                                                
Raised at file "src/DessserOCamlBackEndHelpers.ml", line 362, characters 4-25                                                                                                 
Called from file "src/DessserOCamlBackEndHelpers.ml", line 434, characters 25-35                                                                                              
Called from file "/tmp/dessser_dessser_test_55eefea8.ml", line 4243, characters 107-144 
Called from file "/tmp/dessser_dessser_test_55eefea8.ml", line 5436, characters 21-47
Called from file "/tmp/dessser_dessser_test_55eefea8.ml", line 5447, characters 2-10
Called from file "/tmp/dessser_dessser_test_55eefea8.ml", line 5452, characters 4-11

Child process exited with status code 2
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Failure: >>src/DessserQCheck.ml:983

expected: (null ((0 1493052598159462) (-50276168747379 2341625361) null) ((2 65475) (96308331860597 null) null) null ((1 null) (null 4172393385) null) ((3 58352) (-3471506818
5019 4230523545) null))
but got: 
///////////////////////////////////////////////////////////////////////////////
@rixed rixed added the bug Something isn't working label Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant