[Bug tree-optimization/83221] New: qsort comparator not anti-commutative: -2147483648, -2147483648

babokin at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Nov 29 20:00:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83221

            Bug ID: 83221
           Summary: qsort comparator not anti-commutative: -2147483648,
                    -2147483648
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: babokin at gmail dot com
  Target Milestone: ---

Created attachment 42748
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42748&action=edit
reproducer

gcc trunk rev255248, x86_64.

> time g++ -std=c++11 -w -O2 -o gcc_skx_opt_func.o -c func_reduced_gcc_skx_opt.cpp
func_reduced_gcc_skx_opt.cpp: In function ‘void tf_4_foo()’:
func_reduced_gcc_skx_opt.cpp:250:14: error: qsort comparator not
anti-commutative: -2147483648, -2147483648
         void tf_4_foo () {
              ^~~~~~~~
during GIMPLE pass: reassoc
func_reduced_gcc_skx_opt.cpp:250:14: internal compiler error: qsort checking
failed
0x8f5c3a qsort_chk_error
        ../../gcc/gcc/vec.c:222
0x8f5ca5 qsort_chk(void*, unsigned long, unsigned long, int (*)(void const*,
void const*))
        ../../gcc/gcc/vec.c:276
0x7db30b vec<operand_entry*, va_heap, vl_embed>::qsort(int (*)(void const*,
void const*))
        ../../gcc/gcc/vec.h:1050
0x7db30b vec<operand_entry*, va_heap, vl_ptr>::qsort(int (*)(void const*, void
const*))
        ../../gcc/gcc/vec.h:1812
0x7db30b reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5831
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
0x7dae22 reassociate_bb
        ../../gcc/gcc/tree-ssa-reassoc.c:5983
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


More information about the Gcc-bugs mailing list