public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "skpgkp2 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/95237] LOCAL_DECL_ALIGNMENT shrinks alignment, FAIL gcc.target/i386/pr69454-2.c Date: Mon, 01 Jun 2020 20:47:49 +0000 [thread overview] Message-ID: <bug-95237-4-bFwlL8O5cg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95237-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95237 --- Comment #4 from Sunil Pandey <skpgkp2 at gmail dot com> --- This test case and many other regression on x86 caused by following change set r11-508 Good ==== $ /local/skpandey/gccwork/pr95237/tools-build/gcc-debug-r11-507/release/usr/gcc-11.0.0-x86-64/bin/gcc -m32 -mpreferred-stack-boundary=2 foo.c bash-5.0$ echo $? 0 Bad === bash-5.0$ /local/skpandey/gccwork/pr95237/tools-build/gcc-debug-r11-508/release/usr/gcc-11.0.0-x86-64/bin/gcc -m32 -mpreferred-stack-boundary=2 foo.c during GIMPLE pass: adjust_alignment foo.c: In function ??main??: foo.c:7:5: internal compiler error: in execute, at adjust-alignment.c:73 7 | int main() | ^~~~ 0x206a091 execute /local/skpandey/gccwork/pr95237/gcc/gcc/adjust-alignment.c:73 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. $git show dfa4fcdba374ed44d4aa1a22b2738f3f5c5b37af commit dfa4fcdba374ed44d4aa1a22b2738f3f5c5b37af Author: Kito Cheng <kito.cheng@sifive.com> Date: Tue Apr 14 14:53:19 2020 +0800 Fix alignment for local variable [PR90811] - The alignment for local variable was adjust during estimate_stack_frame_size, however it seems wrong spot to adjust that, expand phase will adjust that but it little too late to some gimple optimization, which rely on certain target hooks need to check alignment, forwprop is an example for that, result of simplify_builtin_call rely on the alignment on some target like ARM or RISC-V. - Exclude static local var and hard register var in the process of alignment adjustment. - This patch fix gfortran.dg/pr45636.f90 for arm and riscv. - Regression test on riscv32/riscv64 and x86_64-linux-gnu, no new fail introduced. gcc/ChangeLog PR target/90811 * Makefile.in (OBJS): Add adjust-alignment.o. * adjust-alignment.c (pass_data_adjust_alignment): New. (pass_adjust_alignment): New. (pass_adjust_alignment::execute): New. (make_pass_adjust_alignment): New. * tree-pass.h (make_pass_adjust_alignment): New. * passes.def: Add pass_adjust_alignment. diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9eee988e12c..fdaa94ae8b9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2020-05-20 Kito Cheng <kito.cheng@sifive.com> + + PR target/90811 + * Makefile.in (OBJS): Add adjust-alignment.o. + * adjust-alignment.c (pass_data_adjust_alignment): New. + (pass_adjust_alignment): New. + (pass_adjust_alignment::execute): New. + (make_pass_adjust_alignment): New. + * tree-pass.h (make_pass_adjust_alignment): New. + * passes.def: Add pass_adjust_alignment. GDB dump: ========= The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /local/skpandey/gccwork/pr95237/tools-build/gcc-debug-r11-508/release/usr/gcc-11.0.0-x86-64/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/cc1 -quiet -imultilib 32 -iprefix /local/skpandey/gccwork/pr95237/tools-build/gcc-debug-r11-508/release/usr/gcc-11.0.0-x86-64/bin/../lib/gcc/x86_64-pc-linux-gnu/11.0.0/ foo.c -quiet -dumpbase foo.c -m32 -mpreferred-stack-boundary=2 -mtune=generic -march=x86-64 -auxbase foo -o /tmp/ccEnTcu1.s File "/usr/share/gdb/auto-load/usr/lib64/libisl.so.15.1.1-gdb.py", line 67 print "No isl printer for this type" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("No isl printer for this type")? Breakpoint 1, (anonymous namespace)::pass_adjust_alignment::execute (this=0x32fbb10, fun=0x7fffea9340b0) at /local/skpandey/gccwork/pr95237/gcc/gcc/adjust-alignment.c:73 73 gcc_assert (align >= DECL_ALIGN (var)); (gdb) c Continuing. Breakpoint 1, (anonymous namespace)::pass_adjust_alignment::execute (this=0x32fbb10, fun=0x7fffea9340b0) at /local/skpandey/gccwork/pr95237/gcc/gcc/adjust-alignment.c:73 73 gcc_assert (align >= DECL_ALIGN (var)); (gdb) n during GIMPLE pass: adjust_alignment foo.c: In function ??main??: foo.c:7:5: internal compiler error: in execute, at adjust-alignment.c:73 7 | int main() | ^~~~ 0x206a091 execute /local/skpandey/gccwork/pr95237/gcc/gcc/adjust-alignment.c:73 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. [Inferior 1 (process 4132225) exited with code 04] (gdb) Can we just exclude adjust-alignment pass for x86?
next prev parent reply other threads:[~2020-06-01 20:47 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-20 12:58 [Bug target/95237] New: " rguenth at gcc dot gnu.org 2020-05-20 15:34 ` [Bug target/95237] " hjl.tools at gmail dot com 2020-05-28 7:36 ` rguenth at gcc dot gnu.org 2020-06-01 8:38 ` ubizjak at gmail dot com 2020-06-01 20:47 ` skpgkp2 at gmail dot com [this message] 2020-06-01 21:24 ` hjl.tools at gmail dot com 2020-06-02 3:31 ` kito at gcc dot gnu.org 2020-06-02 7:53 ` rguenth at gcc dot gnu.org 2020-06-02 11:06 ` hjl.tools at gmail dot com 2020-06-02 12:00 ` rguenther at suse dot de 2020-06-02 12:55 ` hjl.tools at gmail dot com 2020-06-02 13:07 ` rguenther at suse dot de 2020-06-02 13:18 ` hjl.tools at gmail dot com 2020-06-02 13:35 ` rguenther at suse dot de 2020-06-02 16:55 ` skpgkp2 at gmail dot com 2020-06-02 17:52 ` rguenther at suse dot de 2020-06-11 17:09 ` jakub at gcc dot gnu.org 2020-06-19 17:40 ` skpgkp2 at gmail dot com 2020-06-20 0:36 ` skpgkp2 at gmail dot com 2020-06-26 13:47 ` jakub at gcc dot gnu.org 2020-07-20 13:05 ` dcb314 at hotmail dot com 2020-07-21 23:30 ` cvs-commit at gcc dot gnu.org 2020-07-21 23:30 ` hjl.tools at gmail dot com 2020-07-22 6:34 ` skpgkp2 at gmail dot com 2020-07-22 14:41 ` cvs-commit at gcc dot gnu.org 2020-07-24 21:19 ` cvs-commit at gcc dot gnu.org 2020-07-24 21:20 ` hjl.tools at gmail dot com
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=bug-95237-4-bFwlL8O5cg@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).