Open NinaRanns opened 1 month ago
reproducible on trunk
test case
template<typename S> auto f(S s) [[pre :s > 0]] { return -s; } int main(int, char**) { f(5.5); return 0; }
https://godbolt.org/z/ThzsTTvn6
stack trace
(gdb) r Starting program: /home/nina/git/contracts/build/gcc/cc1plus -quiet -nostdinc++ -I /home/nina/git/contracts/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I /home/nina/git/contracts/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I /home/nina/git/contracts/gcc/libstdc++-v3/libsupc++ -I /home/nina/git/contracts/gcc/libstdc++-v3/include/backward -I /home/nina/git/contracts/gcc/libstdc++-v3/testsuite/util -imultiarch x86_64-linux-gnu -iprefix /home/nina/git/contracts/build/gcc/../lib/gcc/x86_64-pc-linux-gnu/15.0.0/ -isystem /home/nina/git/contracts/build/gcc/testsuite/g++/../../include -isystem /home/nina/git/contracts/build/gcc/testsuite/g++/../../include-fixed/x86_64-linux-gnu -isystem /home/nina/git/contracts/build/gcc/testsuite/g++/../../include-fixed -D_GNU_SOURCE /home/nina/git/contracts/gcc/gcc/testsuite/g++.dg/contracts/cpp26/temp4.C -quiet -dumpbase temp4.C -dumpbase-ext .C -mtune=generic -march=x86-64 -std=c++20 -fdiagnostics-color=never -fdiagnostics-urls=never -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-path-format=separate-events -fdiagnostics-text-art-charset=none -fno-diagnostics-show-event-links -fmessage-length=0 -fcontracts -fcontract-continuation-mode=on -o temp4.s /home/nina/git/contracts/gcc/gcc/testsuite/g++.dg/contracts/cpp26/temp4.C: In function ‘auto f(S) [with S = double]’: /home/nina/git/contracts/gcc/gcc/testsuite/g++.dg/contracts/cpp26/temp4.C:5:6: error: mismatching comparison operand types double int _1 = s > 0; /home/nina/git/contracts/gcc/gcc/testsuite/g++.dg/contracts/cpp26/temp4.C:5:6: internal compiler error: ‘verify_gimple’ failed 0x27fe5be internal_error(char const*, ...) ../../gcc/gcc/diagnostic-global-context.cc:492 0x140ec5a verify_gimple_in_seq(gimple*, bool) ../../gcc/gcc/tree-cfg.cc:5332 0x10847ba gimplify_body(tree_node*, bool) ../../gcc/gcc/gimplify.cc:19476 0x1084970 gimplify_function_tree(tree_node*) ../../gcc/gcc/gimplify.cc:19594 0xe92347 cgraph_node::analyze() ../../gcc/gcc/cgraphunit.cc:687 0xe94fa7 analyze_functions ../../gcc/gcc/cgraphunit.cc:1251 0xe95f0d symbol_table::finalize_compilation_unit() ../../gcc/gcc/cgraphunit.cc:2560 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. [Inferior 1 (process 24223) exited with code 04]
reproducible on trunk
test case
https://godbolt.org/z/ThzsTTvn6
stack trace