From: Arthur Cohen <arthur.cohen@embecosm.com>
To: Thomas Schwinge <thomas@codesourcery.com>,
Jan-Benedict Glaw <jbglaw@lug-owl.de>,
gcc-patches@gcc.gnu.org, Richard Biener <rguenther@suse.de>
Cc: Gaius Mulley <gaiusmod2@gmail.com>, gcc-rust@gcc.gnu.org
Subject: Re: Rust: In 'type_for_mode' langhook also consider all 'int_n' modes/types (was: Modula-2 / Rust: Many targets failing)
Date: Wed, 22 Feb 2023 15:30:37 +0100 [thread overview]
Message-ID: <72370753-46f9-ec0e-9098-9ecdf3328484@embecosm.com> (raw)
In-Reply-To: <871qmi6iya.fsf@euler.schwinge.homeip.net>
[-- Attachment #1.1.1: Type: text/plain, Size: 4607 bytes --]
Hi Thomas,
On 2/22/23 12:25, Thomas Schwinge wrote:
> Hi!
>
> Richard, you may remember your words from <https://gcc.gnu.org/PR46805>
> "ICE: SIGSEGV in optab_for_tree_code (optabs.c:407) with -O -fno-tree-scev-cprop -ftree-vectorize":
>
>> Ideally we'd never use lang_hooks.types.type_for_mode (or _for_size) in the
>> middle-end but had a pure middle-end based implementation.
>
> Is there a canonical PR or other discussion thread for that?
>
> Here's another instance of this issue:
>
> On 2022-12-19T22:23:45+0100, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
>> With the recent merges for Modula-2 and Rust, I see a good number of
>> targets failing with --enable-languages=all, mostly due to issues with
>> the Modula-2 driver.
>
> Thanks for reporting.
>
>> Modula-2 related issues
>> [snipped]
>
>> Rust related issues
>> =====================
>>
>> --target=msp430-elfbare
>> ~~~~~~~~~~~~~~~~~~~~~~~~~
>> /var/lib/laminar/run/gcc-msp430-elfbare/24/toolchain-build/./gcc/xgcc -B/var/lib/laminar/run/gcc-msp430-elfbare/24/toolchain-build/./gcc/ -xrust -frust-incomplete-and-experimental-compiler-do-not-use -nostdinc /dev/null -S -o /dev/null -fself-test=../../gcc/gcc/testsuite/selftests
>> <built-in>: internal compiler error: Segmentation fault
>> 0xf2efbf crash_signal
>> ../../gcc/gcc/toplev.cc:314
>> 0x120c8c7 build_function_type(tree_node*, tree_node*, bool)
>> ../../gcc/gcc/tree.cc:7360
>> 0x120cc20 build_function_type_list(tree_node*, ...)
>> ../../gcc/gcc/tree.cc:7442
>> 0x120d16b build_common_builtin_nodes()
>> ../../gcc/gcc/tree.cc:9883
>> 0x8449b4 grs_langhook_init
>> ../../gcc/gcc/rust/rust-lang.cc:132
>> 0x8427b2 lang_dependent_init
>> ../../gcc/gcc/toplev.cc:1815
>> 0x8427b2 do_compile
>> ../../gcc/gcc/toplev.cc:2110
>> 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.
>> make[1]: *** [../../gcc/gcc/rust/Make-lang.in:275: s-selftest-rust] Error 1
>
> See also <https://github.com/Rust-GCC/gccrs/issues/1713>
> "Test failure on msp430-elfbare target".
>
> I confirm with both upstream GCC master branch and GCC/Rust master
> branch:
>
> $ ../source-gcc/configure --target=msp430-elfbare --enable-languages=rust [...]
> $ make all-gcc [...]
> [...]
> [...]/build-gcc/./gcc/xgcc -B[...]/build-gcc/./gcc/ -xc -nostdinc /dev/null -S -o /dev/null -fself-test=../../source-gcc/gcc/testsuite/selftests
> -fself-test: 57323 pass(es) in 0.420000 seconds
> echo timestamp > s-selftest-c
> [...]/build-gcc/./gcc/xgcc -B[...]/build-gcc/./gcc/ -xrust -frust-incomplete-and-experimental-compiler-do-not-use -nostdinc /dev/null -S -o /dev/null -fself-test=../../source-gcc/gcc/testsuite/selftests
> <built-in>: internal compiler error: Segmentation fault
> 0xf51b9f crash_signal
> ../../source-gcc/gcc/toplev.cc:314
> 0x12e6a3a build_function_type(tree_node*, tree_node*, bool)
> ../../source-gcc/gcc/tree.cc:7447
> 0x12e6ee0 build_function_type_list(tree_node*, ...)
> ../../source-gcc/gcc/tree.cc:7529
> 0x12e748e build_common_builtin_nodes()
> ../../source-gcc/gcc/tree.cc:9977
> 0x7661c4 grs_langhook_init
> ../../source-gcc/gcc/rust/rust-lang.cc:128
> 0x762ac9 lang_dependent_init
> ../../source-gcc/gcc/toplev.cc:1815
> 0x762ac9 do_compile
> ../../source-gcc/gcc/toplev.cc:2110
> 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.
> make[1]: *** [s-selftest-rust] Error 1
> [...]
>
> OK to push the attached
> "Rust: In 'type_for_mode' langhook also consider all 'int_n' modes/types"?|
OK :) patch was tested on x86_64 and builds, bootstraps and pass the
testsuite.
Kindly,
Arthur
>
>
> Grüße
> Thomas
>
>
> -----------------
> Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3195 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2023-02-22 14:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221219212344.ewtuzd2jtztm77x2@lug-owl.de>
2023-02-22 11:25 ` Thomas Schwinge
2023-02-22 11:45 ` Richard Biener
2023-02-22 14:30 ` Arthur Cohen [this message]
2023-02-24 9:12 ` Jan-Benedict Glaw
2023-02-25 22:20 ` Jan-Benedict Glaw
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=72370753-46f9-ec0e-9098-9ecdf3328484@embecosm.com \
--to=arthur.cohen@embecosm.com \
--cc=gaiusmod2@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gcc-rust@gcc.gnu.org \
--cc=jbglaw@lug-owl.de \
--cc=rguenther@suse.de \
--cc=thomas@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).