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

Bump gcc into 14.2 release version. #1531

Merged
merged 5 commits into from
Sep 26, 2024
Merged

Conversation

pz9115
Copy link
Contributor

@pz9115 pz9115 commented Aug 12, 2024

Bump gcc into 14.2.0 release version, update the allowlist.

@TommyMurphyTM1234
Copy link
Collaborator

I guess that this PR renders the following one moot/redundant?

test/allowlist/gcc/common.log Outdated Show resolved Hide resolved
Comment on lines 65 to 67
# RV64 fail case
#
FAIL: gcc.dg/tree-prof/time-profiler-2.c
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC it's a random fail case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will check it again :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reproduced the fail case, move it into glibc.rv64.log.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test/allowlist/gcc/newlib.log Outdated Show resolved Hide resolved
Comment on lines 11 to 14
# Fixed but not backport
#
FAIL: gcc.dg/tree-prof/time-profiler-2.c
UNRESOLVED: gcc.target/riscv/rvv/autovec/vls-vlmax/full-vec-move1.c
FAIL: gcc.target/riscv/rvv/autovec/vls-vlmax/full-vec-move1.c
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops, could you point me which commit fix that? so that I could backport that and we will have fix on 14.3...

Copy link
Contributor Author

@pz9115 pz9115 Aug 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pz9115 pz9115 closed this Aug 14, 2024
@pz9115 pz9115 reopened this Aug 14, 2024
@kito-cheng
Copy link
Collaborator

ack, I am running regression on my machine.

Copy link
Collaborator

@cmuellner cmuellner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

@cmuellner
Copy link
Collaborator

I'm running a multilib build locally right now (with this PR on top of the other update PRs for binutils, qemu, glibc, and gdb).
If everything runs fine, I will merge this later today.

@cmuellner
Copy link
Collaborator

I got the following errors:

               ========= Summary of gcc testsuite =========
                            | # of unexpected case / # of unique unexpected case
                            |          gcc |          g++ |     gfortran |
   rv32imac/  ilp32/ medlow |    1 /     1 |    0 /     0 |   37 /     7 |
 rv32imafdc/ ilp32d/ medlow |    0 /     0 |    0 /     0 |    0 /     0 |
   rv64imac/   lp64/ medlow |   25 /     4 |    0 /     0 |   37 /     7 |
 rv64imafdc/  lp64d/ medlow |   24 /     3 |    0 /     0 |    0 /     0 |

Failing tests are:

  • gfortran.dg/matmul_15.f90
  • gfortran.dg/ieee/comparisons_3.F90
  • gfortran.dg/ieee/ieee_1.F90
  • gfortran.dg/ieee/large_2.f90
  • gfortran.dg/ieee/rounding_1.f90
  • gcc.dg/plugin/cpython-plugin-test-PyList_Append.c
  • gcc.dg/plugin/cpython-plugin-test-PyList_New.c
  • gcc.dg/plugin/cpython-plugin-test-PyLong_FromLong.c
  • gcc.dg/pr110279-1.c

Some of the fortran tests have been removed in this PR.

@pz9115
Copy link
Contributor Author

pz9115 commented Aug 27, 2024

Verified on

I got the following errors:

               ========= Summary of gcc testsuite =========
                            | # of unexpected case / # of unique unexpected case
                            |          gcc |          g++ |     gfortran |
   rv32imac/  ilp32/ medlow |    1 /     1 |    0 /     0 |   37 /     7 |
 rv32imafdc/ ilp32d/ medlow |    0 /     0 |    0 /     0 |    0 /     0 |
   rv64imac/   lp64/ medlow |   25 /     4 |    0 /     0 |   37 /     7 |
 rv64imafdc/  lp64d/ medlow |   24 /     3 |    0 /     0 |    0 /     0 |

Failing tests are:

Reproduced in the corresponding arch-abi combination, show execution errors, maybe they are qemu issues.

  • gfortran.dg/matmul_15.f90
  • gfortran.dg/ieee/comparisons_3.F90
  • gfortran.dg/ieee/ieee_1.F90
  • gfortran.dg/ieee/large_2.f90
  • gfortran.dg/ieee/rounding_1.f90

The follow fail cases not reproduced, could you check these tests' log, thanks!

  • gcc.dg/plugin/cpython-plugin-test-PyList_Append.c
  • gcc.dg/plugin/cpython-plugin-test-PyList_New.c
  • gcc.dg/plugin/cpython-plugin-test-PyLong_FromLong.c
  • gcc.dg/pr110279-1.c

Some of the fortran tests have been removed in this PR.

@pz9115 pz9115 requested a review from cmuellner August 28, 2024 02:03
@cmuellner
Copy link
Collaborator

Failing tests are:

Reproduced in the corresponding arch-abi combination, show execution errors, maybe they are qemu issues.

  • gfortran.dg/matmul_15.f90
  • gfortran.dg/ieee/comparisons_3.F90
  • gfortran.dg/ieee/ieee_1.F90
  • gfortran.dg/ieee/large_2.f90
  • gfortran.dg/ieee/rounding_1.f90

We don't need to analyze the root cause.
Just don't remove them from the allow-list (or adjust as needed).

The follow fail cases not reproduced, could you check these tests' log, thanks!

  • gcc.dg/plugin/cpython-plugin-test-PyList_Append.c
  • gcc.dg/plugin/cpython-plugin-test-PyList_New.c
  • gcc.dg/plugin/cpython-plugin-test-PyLong_FromLong.c

The Python stuff looks very strange.
GCC triggers a segfault (I wonder why you don't see this):

Executing on host: python3-config --includes    (timeout = 300)
spawn -ignore SIGHUP python3-config --includes
-I/usr/include/python3.12 -I/usr/include/python3.12
Executing on host: /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/  python_h3727981.c  -march=rv64imac -mabi=lp64 -mcmodel=medlow   -fdiagnostics-plain-output  -I/usr/include/python3.12 -I/usr/include/python3.12 -Wno-complain-wrong-lang -S   -o python_h3727981.s    (timeout = 600)
spawn -ignore SIGHUP /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/ python_h3727981.c -march=rv64imac -mabi=lp64 -mcmodel=medlow -fdiagnostics-plain-output -I/usr/include/python3.12 -I/usr/include/python3.12 -Wno-complain-wrong-lang -S -o python_h3727981.s
Executing on host: /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/  /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/cpython-plugin-test-PyList_Append.c  -march=rv64imac -mabi=lp64 -mcmodel=medlow   -fdiagnostics-plain-output  -fplugin=./analyzer_cpython_plugin.so -fanalyzer -I/usr/include/python3.12 -I/usr/include/python3.12 -S   -o cpython-plugin-test-PyList_Append.s    (timeout = 600)
spawn -ignore SIGHUP /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/ /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -march=rv64imac -mabi=lp64 -mcmodel=medlow -fdiagnostics-plain-output -fplugin=./analyzer_cpython_plugin.so -fanalyzer -I/usr/include/python3.12 -I/usr/include/python3.12 -S -o cpython-plugin-test-PyList_Append.s
*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_ANALYZER_INIT             | analyzer_cpython_plugin
during IPA pass: analyzer
/home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/cpython-plugin-test-PyList_Append.c: In function 'test_PyListAppend_6':
/home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/cpython-plugin-test-PyList_Append.c:76:3: internal compiler error: Segmentation fault
0xffff8f crash_signal
        ../.././gcc/gcc/toplev.cc:319
0x7f38e4d08b30 get_field_by_name
        /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c:74
0x7f38e4d09d23 ana::kf_PyList_Append::impl_call_pre(ana::call_details const&) const
        /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c:609
0x139b227 ana::region_model::on_call_pre(gcall const*, ana::region_model_context*)
        ../.././gcc/gcc/analyzer/region-model.cc:1718
0x139c9aa ana::region_model::on_stmt_pre(gimple const*, bool*, ana::region_model_context*)
        ../.././gcc/gcc/analyzer/region-model.cc:1355
0x136f676 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::uncertainty_t*, bool*, ana::path_context*)
        ../.././gcc/gcc/analyzer/engine.cc:1515
0x137223a ana::exploded_graph::process_node(ana::exploded_node*)
        ../.././gcc/gcc/analyzer/engine.cc:4125
0x137308a ana::exploded_graph::process_worklist()
        ../.././gcc/gcc/analyzer/engine.cc:3516
0x1375445 ana::impl_run_checkers(ana::logger*)
        ../.././gcc/gcc/analyzer/engine.cc:6210
0x13765b6 ana::run_checkers()
        ../.././gcc/gcc/analyzer/engine.cc:6308
0x13664f8 execute
        ../.././gcc/gcc/analyzer/analyzer-pass.cc:87
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.
compiler exited with status 1
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so (internal compiler error: Segmentation fault)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 17)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  at line 18 (test for warnings, line 17)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 28)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 36)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 39)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 41)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 42)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  at line 43 (test for warnings, line 42)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so (test for excess errors)
Excess errors:
*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
  • gcc.dg/pr110279-1.c

This is probably a regression (I wonder why you cannot reproduce):

Executing on host: /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/  /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/pr110279-1.c  -march=rv64imac -mabi=lp64 -mcmodel=medlow   -fdiagnostics-plain-output   -Ofast --param avoid-fma-max-bits=512 --param tree-reassoc-width=4 -fdump-tree-widening_mul-details -S   -o pr110279-1.s    (timeout = 600)
spawn -ignore SIGHUP /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/ /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/pr110279-1.c -march=rv64imac -mabi=lp64 -mcmodel=medlow -fdiagnostics-plain-output -Ofast --param avoid-fma-max-bits=512 --param tree-reassoc-width=4 -fdump-tree-widening_mul-details -S -o pr110279-1.s
PASS: gcc.dg/pr110279-1.c (test for excess errors)
gcc.dg/pr110279-1.c: pattern found 0 times
FAIL: gcc.dg/pr110279-1.c scan-tree-dump-times widening_mul "Generated FMA" 3

@pz9115
Copy link
Contributor Author

pz9115 commented Sep 5, 2024

Failing tests are:

Reproduced in the corresponding arch-abi combination, show execution errors, maybe they are qemu issues.

  • gfortran.dg/matmul_15.f90
  • gfortran.dg/ieee/comparisons_3.F90
  • gfortran.dg/ieee/ieee_1.F90
  • gfortran.dg/ieee/large_2.f90
  • gfortran.dg/ieee/rounding_1.f90

We don't need to analyze the root cause. Just don't remove them from the allow-list (or adjust as needed).

Agree.

The follow fail cases not reproduced, could you check these tests' log, thanks!

  • gcc.dg/plugin/cpython-plugin-test-PyList_Append.c
  • gcc.dg/plugin/cpython-plugin-test-PyList_New.c
  • gcc.dg/plugin/cpython-plugin-test-PyLong_FromLong.c

The Python stuff looks very strange. GCC triggers a segfault (I wonder why you don't see this):

Executing on host: python3-config --includes    (timeout = 300)
spawn -ignore SIGHUP python3-config --includes
-I/usr/include/python3.12 -I/usr/include/python3.12
Executing on host: /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/  python_h3727981.c  -march=rv64imac -mabi=lp64 -mcmodel=medlow   -fdiagnostics-plain-output  -I/usr/include/python3.12 -I/usr/include/python3.12 -Wno-complain-wrong-lang -S   -o python_h3727981.s    (timeout = 600)
spawn -ignore SIGHUP /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/ python_h3727981.c -march=rv64imac -mabi=lp64 -mcmodel=medlow -fdiagnostics-plain-output -I/usr/include/python3.12 -I/usr/include/python3.12 -Wno-complain-wrong-lang -S -o python_h3727981.s
Executing on host: /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/  /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/cpython-plugin-test-PyList_Append.c  -march=rv64imac -mabi=lp64 -mcmodel=medlow   -fdiagnostics-plain-output  -fplugin=./analyzer_cpython_plugin.so -fanalyzer -I/usr/include/python3.12 -I/usr/include/python3.12 -S   -o cpython-plugin-test-PyList_Append.s    (timeout = 600)
spawn -ignore SIGHUP /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/ /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -march=rv64imac -mabi=lp64 -mcmodel=medlow -fdiagnostics-plain-output -fplugin=./analyzer_cpython_plugin.so -fanalyzer -I/usr/include/python3.12 -I/usr/include/python3.12 -S -o cpython-plugin-test-PyList_Append.s
*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_ANALYZER_INIT             | analyzer_cpython_plugin
during IPA pass: analyzer
/home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/cpython-plugin-test-PyList_Append.c: In function 'test_PyListAppend_6':
/home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/cpython-plugin-test-PyList_Append.c:76:3: internal compiler error: Segmentation fault
0xffff8f crash_signal
        ../.././gcc/gcc/toplev.cc:319
0x7f38e4d08b30 get_field_by_name
        /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c:74
0x7f38e4d09d23 ana::kf_PyList_Append::impl_call_pre(ana::call_details const&) const
        /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c:609
0x139b227 ana::region_model::on_call_pre(gcall const*, ana::region_model_context*)
        ../.././gcc/gcc/analyzer/region-model.cc:1718
0x139c9aa ana::region_model::on_stmt_pre(gimple const*, bool*, ana::region_model_context*)
        ../.././gcc/gcc/analyzer/region-model.cc:1355
0x136f676 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::uncertainty_t*, bool*, ana::path_context*)
        ../.././gcc/gcc/analyzer/engine.cc:1515
0x137223a ana::exploded_graph::process_node(ana::exploded_node*)
        ../.././gcc/gcc/analyzer/engine.cc:4125
0x137308a ana::exploded_graph::process_worklist()
        ../.././gcc/gcc/analyzer/engine.cc:3516
0x1375445 ana::impl_run_checkers(ana::logger*)
        ../.././gcc/gcc/analyzer/engine.cc:6210
0x13765b6 ana::run_checkers()
        ../.././gcc/gcc/analyzer/engine.cc:6308
0x13664f8 execute
        ../.././gcc/gcc/analyzer/analyzer-pass.cc:87
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.
compiler exited with status 1
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so (internal compiler error: Segmentation fault)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 17)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  at line 18 (test for warnings, line 17)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 28)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 36)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 39)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 41)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 42)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  at line 43 (test for warnings, line 42)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so (test for excess errors)
Excess errors:
*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.

I checked the output log, these python cases were marked as unsupported on my machine, maybe it relative to local python version. Anyway, these cases really fail and I will add them to list in next commit.

Executing on host: /root/riscv-gnu-toolchain/build-gcc-linux-stage2/gcc/xgcc -B/root/riscv-gnu-toolchain/build-gcc-linux-stage2/gcc/  python_h411799.c  -march=rv64imafdc -mabi=lp64d -mcmodel=medlow   -fdiagnostics-plain-output  -I/usr/include/python3.8 -I/usr/include/python3.8 -Wno-complain-wrong-lang -S   -o python_h411799.s    (timeout = 600)
spawn -ignore SIGHUP /root/riscv-gnu-toolchain/build-gcc-linux-stage2/gcc/xgcc -B/root/riscv-gnu-toolchain/build-gcc-linux-stage2/gcc/ python_h411799.c -march=rv64imafdc -mabi=lp64d -mcmodel=medlow -fdiagnostics-plain-output -I/usr/include/python3.8 -I/usr/include/python3.8 -Wno-complain-wrong-lang -S -o python_h411799.s
In file included from /usr/include/python3.8/Python.h:8,
                 from python_h411799.c:2:
/usr/include/python3.8/pyconfig.h:86:14: fatal error: riscv64-linux-gnu/python3.8/pyconfig.h: No such file or directory
compilation terminated.
compiler exited with status 1
UNSUPPORTED: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so
Executing on host: python3-config --includes    (timeout = 300)
spawn -ignore SIGHUP python3-config --includes
-I/usr/include/python3.8 -I/usr/include/python3.8
UNSUPPORTED: gcc.dg/plugin/cpython-plugin-test-PyList_New.c -fplugin=./analyzer_cpython_plugin.so
Executing on host: python3-config --includes    (timeout = 300)
spawn -ignore SIGHUP python3-config --includes
-I/usr/include/python3.8 -I/usr/include/python3.8
UNSUPPORTED: gcc.dg/plugin/cpython-plugin-test-PyLong_FromLong.c -fplugin=./analyzer_cpython_plugin.so

> > * `gcc.dg/pr110279-1.c`

This is probably a regression (I wonder why you cannot reproduce):

Executing on host: /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/ /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/pr110279-1.c -march=rv64imac -mabi=lp64 -mcmodel=medlow -fdiagnostics-plain-output -Ofast --param avoid-fma-max-bits=512 --param tree-reassoc-width=4 -fdump-tree-widening_mul-details -S -o pr110279-1.s (timeout = 600)
spawn -ignore SIGHUP /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/ /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/pr110279-1.c -march=rv64imac -mabi=lp64 -mcmodel=medlow -fdiagnostics-plain-output -Ofast --param avoid-fma-max-bits=512 --param tree-reassoc-width=4 -fdump-tree-widening_mul-details -S -o pr110279-1.s
PASS: gcc.dg/pr110279-1.c (test for excess errors)
gcc.dg/pr110279-1.c: pattern found 0 times
FAIL: gcc.dg/pr110279-1.c scan-tree-dump-times widening_mul "Generated FMA" 3

Failing tests are:

Reproduced in the corresponding arch-abi combination, show execution errors, maybe they are qemu issues.

  • gfortran.dg/matmul_15.f90
  • gfortran.dg/ieee/comparisons_3.F90
  • gfortran.dg/ieee/ieee_1.F90
  • gfortran.dg/ieee/large_2.f90
  • gfortran.dg/ieee/rounding_1.f90

We don't need to analyze the root cause. Just don't remove them from the allow-list (or adjust as needed).

The follow fail cases not reproduced, could you check these tests' log, thanks!

  • gcc.dg/plugin/cpython-plugin-test-PyList_Append.c
  • gcc.dg/plugin/cpython-plugin-test-PyList_New.c
  • gcc.dg/plugin/cpython-plugin-test-PyLong_FromLong.c

The Python stuff looks very strange. GCC triggers a segfault (I wonder why you don't see this):

Executing on host: python3-config --includes    (timeout = 300)
spawn -ignore SIGHUP python3-config --includes
-I/usr/include/python3.12 -I/usr/include/python3.12
Executing on host: /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/  python_h3727981.c  -march=rv64imac -mabi=lp64 -mcmodel=medlow   -fdiagnostics-plain-output  -I/usr/include/python3.12 -I/usr/include/python3.12 -Wno-complain-wrong-lang -S   -o python_h3727981.s    (timeout = 600)
spawn -ignore SIGHUP /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/ python_h3727981.c -march=rv64imac -mabi=lp64 -mcmodel=medlow -fdiagnostics-plain-output -I/usr/include/python3.12 -I/usr/include/python3.12 -Wno-complain-wrong-lang -S -o python_h3727981.s
Executing on host: /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/  /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/cpython-plugin-test-PyList_Append.c  -march=rv64imac -mabi=lp64 -mcmodel=medlow   -fdiagnostics-plain-output  -fplugin=./analyzer_cpython_plugin.so -fanalyzer -I/usr/include/python3.12 -I/usr/include/python3.12 -S   -o cpython-plugin-test-PyList_Append.s    (timeout = 600)
spawn -ignore SIGHUP /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/ /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -march=rv64imac -mabi=lp64 -mcmodel=medlow -fdiagnostics-plain-output -fplugin=./analyzer_cpython_plugin.so -fanalyzer -I/usr/include/python3.12 -I/usr/include/python3.12 -S -o cpython-plugin-test-PyList_Append.s
*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_ANALYZER_INIT             | analyzer_cpython_plugin
during IPA pass: analyzer
/home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/cpython-plugin-test-PyList_Append.c: In function 'test_PyListAppend_6':
/home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/cpython-plugin-test-PyList_Append.c:76:3: internal compiler error: Segmentation fault
0xffff8f crash_signal
        ../.././gcc/gcc/toplev.cc:319
0x7f38e4d08b30 get_field_by_name
        /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c:74
0x7f38e4d09d23 ana::kf_PyList_Append::impl_call_pre(ana::call_details const&) const
        /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c:609
0x139b227 ana::region_model::on_call_pre(gcall const*, ana::region_model_context*)
        ../.././gcc/gcc/analyzer/region-model.cc:1718
0x139c9aa ana::region_model::on_stmt_pre(gimple const*, bool*, ana::region_model_context*)
        ../.././gcc/gcc/analyzer/region-model.cc:1355
0x136f676 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::uncertainty_t*, bool*, ana::path_context*)
        ../.././gcc/gcc/analyzer/engine.cc:1515
0x137223a ana::exploded_graph::process_node(ana::exploded_node*)
        ../.././gcc/gcc/analyzer/engine.cc:4125
0x137308a ana::exploded_graph::process_worklist()
        ../.././gcc/gcc/analyzer/engine.cc:3516
0x1375445 ana::impl_run_checkers(ana::logger*)
        ../.././gcc/gcc/analyzer/engine.cc:6210
0x13765b6 ana::run_checkers()
        ../.././gcc/gcc/analyzer/engine.cc:6308
0x13664f8 execute
        ../.././gcc/gcc/analyzer/analyzer-pass.cc:87
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.
compiler exited with status 1
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so (internal compiler error: Segmentation fault)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 17)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  at line 18 (test for warnings, line 17)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 28)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 36)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 39)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 41)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  (test for warnings, line 42)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so  at line 43 (test for warnings, line 42)
FAIL: gcc.dg/plugin/cpython-plugin-test-PyList_Append.c -fplugin=./analyzer_cpython_plugin.so (test for excess errors)
Excess errors:
*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
  • gcc.dg/pr110279-1.c

This is probably a regression (I wonder why you cannot reproduce):

I'm not sure, local log show it passed, and I check on godbolt it was found 3 times 'Generated FMA'
https://godbolt.org/z/b349a9Tqf

Executing on host: /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/  /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/pr110279-1.c  -march=rv64imac -mabi=lp64 -mcmodel=medlow   -fdiagnostics-plain-output   -Ofast --param avoid-fma-max-bits=512 --param tree-reassoc-width=4 -fdump-tree-widening_mul-details -S   -o pr110279-1.s    (timeout = 600)
spawn -ignore SIGHUP /home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/xgcc -B/home/cm/src/riscv-gnu-toolchain/rv-gcc/build-gcc-linux-stage2/gcc/ /home/cm/src/riscv-gnu-toolchain/rv-gcc/gcc/gcc/testsuite/gcc.dg/pr110279-1.c -march=rv64imac -mabi=lp64 -mcmodel=medlow -fdiagnostics-plain-output -Ofast --param avoid-fma-max-bits=512 --param tree-reassoc-width=4 -fdump-tree-widening_mul-details -S -o pr110279-1.s
PASS: gcc.dg/pr110279-1.c (test for excess errors)
gcc.dg/pr110279-1.c: pattern found 0 times
FAIL: gcc.dg/pr110279-1.c scan-tree-dump-times widening_mul "Generated FMA" 3

@pz9115
Copy link
Contributor Author

pz9115 commented Sep 23, 2024

Re-added the python and gfortan fail cases into allowlist, b2ffbd2

@cmuellner please re-check gcc.dg/pr110279-1.c, https://godbolt.org/z/b349a9Tqf

@kito-cheng
Copy link
Collaborator

Hmmm, still not clean on my hand yet, but very close now:

               ========= Summary of gcc testsuite =========
                            | # of unexpected case / # of unique unexpected case
                            |          gcc |          g++ |     gfortran |
   rv32imac/  ilp32/ medlow |    1 /     1 |    6 /     1 |    6 /     1 |
 rv32imafdc/ ilp32d/ medlow |    0 /     0 |    6 /     1 |    0 /     0 |
   rv64imac/   lp64/ medlow |    1 /     1 |    6 /     1 |    6 /     1 |
 rv64imafdc/  lp64d/ medlow |    0 /     0 |    6 /     1 |    0 /     0 |

gcc.dg/pr110279-1.c

This also fail on my machine as well...?

FAIL: g++.dg/modules/bad-mapper-3.C

And I have this line on my every g++ testsuite, but this may just my env issue.

@cmuellner
Copy link
Collaborator

Same here:

                === gfortran: Unexpected fails for rv32imac ilp32 medlow  ===
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O0  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O1  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O2  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -Os  execution test
                === gfortran: Unexpected fails for rv64imac lp64 medlow  ===
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O0  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O1  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O2  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -Os  execution test
                === gcc: Unexpected fails for rv32imac ilp32 medlow  ===
FAIL: gcc.dg/pr110279-1.c scan-tree-dump-times widening_mul "Generated FMA" 3
                === gcc: Unexpected fails for rv64imac lp64 medlow  ===
FAIL: gcc.dg/pr110279-1.c scan-tree-dump-times widening_mul "Generated FMA" 3

               ========= Summary of gcc testsuite =========
                            | # of unexpected case / # of unique unexpected case
                            |          gcc |          g++ |     gfortran |
   rv32imac/  ilp32/ medlow |    1 /     1 |    0 /     0 |    6 /     1 |
 rv32imafdc/ ilp32d/ medlow |    0 /     0 |    0 /     0 |    0 /     0 |
   rv64imac/   lp64/ medlow |    1 /     1 |    0 /     0 |    6 /     1 |
 rv64imafdc/  lp64d/ medlow |    0 /     0 |    0 /     0 |    0 /     0 |

@kito-cheng
Copy link
Collaborator

@pz9115

FAIL: gcc.dg/pr110279-1.c

It seems because lack of floating point support, this won't generate any FMA after you adding "-march=rv32imac -mabi=ilp32"

https://godbolt.org/z/EaKn93MK1

@pz9115
Copy link
Contributor Author

pz9115 commented Sep 26, 2024

@pz9115

FAIL: gcc.dg/pr110279-1.c

It seems because lack of floating point support, this won't generate any FMA after you adding "-march=rv32imac -mabi=ilp32"

https://godbolt.org/z/EaKn93MK1

Thanks for your work, updated it with new commit.

@pz9115 pz9115 closed this Sep 26, 2024
@pz9115 pz9115 reopened this Sep 26, 2024
Copy link
Collaborator

@kito-cheng kito-cheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!!

@cmuellner
Copy link
Collaborator

               ========= Summary of gcc testsuite =========
                            | # of unexpected case / # of unique unexpected case
                            |          gcc |          g++ |     gfortran |
   rv32imac/  ilp32/ medlow |    0 /     0 |    0 /     0 |    0 /     0 |
 rv32imafdc/ ilp32d/ medlow |    0 /     0 |    0 /     0 |    0 /     0 |
   rv64imac/   lp64/ medlow |    0 /     0 |    0 /     0 |    0 /     0 |
 rv64imafdc/  lp64d/ medlow |    0 /     0 |    0 /     0 |    0 /     0 |

@cmuellner cmuellner merged commit 795267d into riscv-collab:master Sep 26, 2024
21 of 40 checks passed
@cmuellner
Copy link
Collaborator

Jiawei, thank you very much for bringing this over the finish line!

@szedani
Copy link

szedani commented Sep 30, 2024

Hi
Can you please push a tag after the gcc update? @cmuellner
The latest one is from a504f73 (tag: 2024.09.03, tag: 2024.08.28) Merge pull request #1475 from CARV-ICS-FORTH/uclibc

@cmuellner
Copy link
Collaborator

@szedani, I will follow up in #1569.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants