[Bug target/68273] [5 Regression] Wrong code on mips/mipsel due to (invalid?) peeking at alignments in function_arg.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68273 Hector Oron changed: What|Removed |Added CC||hector.oron at gmail dot com --- Comment #23 from Hector Oron --- On mips LE machine running Debian OS, system type : loongson-ls3a-rs780e-1w cpu model : ICT Loongson-3 V0.5 FPU V0.1 I have attempted to build GCC 5.3 with the posted patches: Index: gcc-5-5.3.1/src/gcc/tree-ssanames.c === --- gcc-5-5.3.1.orig/src/gcc/tree-ssanames.c +++ gcc-5-5.3.1/src/gcc/tree-ssanames.c @@ -173,7 +173,7 @@ make_ssa_name_fn (struct function *fn, t if (TYPE_P (var)) { - TREE_TYPE (t) = var; + TREE_TYPE (t) = TYPE_MAIN_VARIANT (var); SET_SSA_NAME_VAR_OR_IDENTIFIER (t, NULL_TREE); } else Index: gcc-5-5.3.1/src/gcc/tree-sra.c === --- gcc-5-5.3.1.orig/src/gcc/tree-sra.c +++ gcc-5-5.3.1/src/gcc/tree-sra.c @@ -4547,7 +4547,7 @@ get_replaced_param_substitute (struct ip { char *pretty_name = make_fancy_name (adj->base); - repl = create_tmp_reg (TREE_TYPE (adj->base), "ISR"); + repl = create_tmp_reg (TYPE_MAIN_VARIANT (TREE_TYPE (adj->base)), "ISR"); DECL_NAME (repl) = get_identifier (pretty_name); obstack_free (&name_obstack, pretty_name); Compiled GCC 5.3.1, then with it compiled graphviz, and using dot application triggers an error (lt-dot: emit.c:3874: bezier_bb: Assertion `bz.size % 3 == 1' failed.) While if I compile graphviz passing -fno-ipa-sra, then dot works as expected. If there is something I can post to help solve this issue let me know.
[Bug target/68273] [5/6 Regression] Wrong code on mips/mipsel due to (invalid?) peeking at alignments in function_arg.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68273 --- Comment #26 from Hector Oron --- (In reply to Richard Biener from comment #25) > Did you try the patch referenced in comment #13 yet? Not really, as I understood that was not safe. But I'll proceed with testing that patch which touches gcc/config/mips/mips.c
[Bug target/68273] [5/6 Regression] Wrong code on mips/mipsel due to (invalid?) peeking at alignments in function_arg.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68273 --- Comment #27 from Hector Oron --- (In reply to Richard Biener from comment #25) > Re-adding GCC 6 as regression, though graphviz is not gsoap. Right, I initially thought it was the same issue, as it only happens on mips, and both have a workaround of using -fno-ipa-sra.
[Bug target/68273] [5/6 Regression] Wrong code on mips/mipsel due to (invalid?) peeking at alignments in function_arg.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68273 --- Comment #30 from Hector Oron --- (In reply to Steve Ellcey from comment #28) > (In reply to Hector Oron from comment #27) > > (In reply to Richard Biener from comment #25) > > > Re-adding GCC 6 as regression, though graphviz is not gsoap. > > > > Right, I initially thought it was the same issue, as it only happens on > > mips, and both have a workaround of using -fno-ipa-sra. > > Rather than the original patch from comment #13, I would try this follow-up > mips.c change: > > https://gcc.gnu.org/ml/gcc-patches/2016-02/msg00250.html > > I think it is better but I am still not sure if it is what we want to do as > a permanent fix. That one worked for me. I was able to compile graphviz properly and dot is not aborting anymore.
[Bug target/68273] [5/6 Regression] Wrong code on mips/mipsel due to (invalid?) peeking at alignments in function_arg.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68273 --- Comment #32 from Hector Oron --- (In reply to Richard Biener from comment #31) > eipa_sra introduces the remaining SSA name with non-default alignment via [PATCH] > it would be nice to see this IL checking on trunk and thus results from > testing on affected targets - I'll give it a try in x86_64. I have backported the patch to 5.3.1, which I am using.. and applying the following patch based on yours, dot does not fail here anymore. I also have a gcc built with tests, which I'll try to submit to relevant mailing list. Extending already commited patch from comment #20 with: Index: gcc-5-5.3.1/src/gcc/tree-sra.c === --- gcc-5-5.3.1.orig/src/gcc/tree-sra.c +++ gcc-5-5.3.1/src/gcc/tree-sra.c @@ -936,7 +936,7 @@ create_access (tree expr, gimple stmt, b access = create_access_1 (base, offset, size); access->expr = expr; - access->type = TREE_TYPE (expr); + access->type = TYPE_MAIN_VARIANT (TREE_TYPE (expr)); access->write = write; access->grp_unscalarizable_region = unscalarizable_region; access->stmt = stmt; @@ -1026,7 +1026,7 @@ completely_scalarize_var (tree var) access = create_access_1 (var, 0, size); access->expr = var; - access->type = TREE_TYPE (var); + access->type = TYPE_MAIN_VARIANT (TREE_TYPE (var)); access->grp_total_scalarization = 1; completely_scalarize_record (var, var, 0, var); Index: gcc-5-5.3.1/src/gcc/tree-ssa.c === --- gcc-5-5.3.1.orig/src/gcc/tree-ssa.c +++ gcc-5-5.3.1/src/gcc/tree-ssa.c @@ -965,6 +965,14 @@ verify_ssa (bool check_modified_stmt, bo name, stmt, virtual_operand_p (name))) goto err; } + + if (TYPE_ALIGN (TREE_TYPE (name)) + != TYPE_ALIGN (TYPE_MAIN_VARIANT (TREE_TYPE (name + { + error ("type with non-default alignment"); + goto err; + } + } }
[Bug target/48173] [4.6 regression] bootstrap error on arm-linux-gnueabi (defaulting to armv4t)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48173 --- Comment #2 from Hector Oron 2011-03-22 00:53:52 UTC --- Created attachment 23746 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23746 Preprocessed source for segfault I was also able to reproduce the bug. Find attached the preprocessed source.
[Bug target/48173] [4.6 regression] bootstrap error on arm-linux-gnueabi (defaulting to armv4t)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48173 Hector Oron changed: What|Removed |Added CC||hector.oron at gmail dot ||com --- Comment #4 from Hector Oron 2011-03-22 14:25:00 UTC --- Hello, I also attempted a backtrace, but I am not sure if it is done properly. (gdb) run The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/zumbi/gcc-4.6-4.6.0~rc1/build/prev-gcc/xgcc -B/home/zumbi/gcc-4.6-4.6.0\~rc1/build/./prev-gcc/ -B/usr/arm-linux-gnueabi/bin/ -B/usr/arm-linux-gnueabi/bin/ -B/usr/arm-linux-gnueabi/lib/ -isystem /usr/arm-linux-gnueabi/include -isystem /usr/arm-linux-gnueabi/sys-include -c -g -O2 -gtoggle -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -Wno-error -DHAVE_CONFIG_H -I. -I. -I../../src/gcc -I../../src/gcc/. -I../../src/gcc/../include -I../../src/gcc/../libcpp/include -I../../src/gcc/../libdecnumber -I../../src/gcc/../libdecnumber/dpd -I../libdecnumber ../../src/gcc/expmed.c -o expmed.o ../../src/gcc/expmed.c: In function 'init_expmed': ../../src/gcc/expmed.c:134:3: warning: array subscript is above array bounds [-Warray-bounds] Breakpoint 2, internal_error (gmsgid=0x25d10 "%s (program %s)") at ../../src/gcc/diagnostic.c:838 838 diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location, DK_ICE); (gdb) bt #0 internal_error (gmsgid=0x25d10 "%s (program %s)") at ../../src/gcc/diagnostic.c:838 #1 0xee98 in execute () at ../../src/gcc/gcc.c:2694 #2 0xf31c in do_spec_1 (spec=0x57890 "-o %|.s |\n as %(asm_options) %m.s %A", inswitch=, soft_matched_part=0x0) at ../../src/gcc/gcc.c:4470 #3 0x00011874 in process_brace_body (p=) at ../../src/gcc/gcc.c:5721 #4 handle_braces (p=) at ../../src/gcc/gcc.c:5634 #5 0xfd78 in do_spec_1 (spec=0x57818 " %{fcompare-debug=*|fdump-final-insns=*:%:compare-debug-dump-opt()} %{!S:-o %|.s |\n as %(asm_options) %m.s %A }", inswitch=, soft_matched_part=0x0) at ../../src/gcc/gcc.c:5107 #6 0x00011874 in process_brace_body (p=) at ../../src/gcc/gcc.c:5721 #7 handle_braces (p=) at ../../src/gcc/gcc.c:5634 #8 0xfd78 in do_spec_1 (spec=0x504f8 "%{!fwpa: %{fcompare-debug=*|fdump-final-insns=*:%:compare-debug-dump-opt()} %{!S:-o %|.s |\n as %(asm_options) %m.s %A } }", inswitch=, soft_matched_part=0x0) at ../../src/gcc/gcc.c:5107 #9 0xf5c4 in do_spec_1 (spec=0x57668 "%(invoke_as)", inswitch=, soft_matched_part=0x0) at ../../src/gcc/gcc.c:5214 #10 0x00011874 in process_brace_body (p=) at ../../src/gcc/gcc.c:5721 #11 handle_braces (p=) at ../../src/gcc/gcc.c:5634 #12 0xfd78 in do_spec_1 (spec=0x571d8 " %{traditional:%eGNU C no longer supports -traditional without -E} %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \t %(cpp_options) -o %{save-temps*:%b.i} %{!save-te"..., inswitch=, soft_matched_part=0x0) at ../../src/gcc/gcc.c:5107 #13 0x00011874 in process_brace_body (p=) at ../../src/gcc/gcc.c:5721 #14 handle_braces (p=) at ../../src/gcc/gcc.c:5634 #15 0xfd78 in do_spec_1 (spec=0x57010 "%{!MM: %{traditional:%eGNU C no longer supports -traditional without -E} %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \t %(cpp_options) -o %{save-temps*:%b.i} %{!s"..., inswitch=, soft_matched_part=0x0) at ../../src/gcc/gcc.c:5107 #16 0x00011874 in process_brace_body (p=) at ../../src/gcc/gcc.c:5721 #17 handle_braces (p=) at ../../src/gcc/gcc.c:5634 #18 0xfd78 in do_spec_1 (spec=0x56e48 "%{!M:%{!MM: %{traditional:%eGNU C no longer supports -traditional without -E} %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \t %(cpp_options) -o %{save-temps*:%b.i}"..., inswitch=, soft_matched_part=0x0) at ../../src/gcc/gcc.c:5107 #19 0x00011874 in process_brace_body (p=) at ../../src/gcc/gcc.c:5721 #20 handle_braces (p=) at ../../src/gcc/gcc.c:5634 #21 0xfd78 in do_spec_1 (spec=0x27b48 "%{E|M|MM:%(trad_capable_cpp) %(cpp_options) %(cpp_debug_options)} %{!E:%{!M:%{!MM: %{traditional:%eGNU C no longer supports -traditional without -E} %{save-temps*|traditional-cpp|no"..., inswitch=, soft_matched_part=0x0) at ../../src/gcc/gcc.c:5107 #22 0x00010d64 in do_spec_2 (spec=) at ../../src/gcc/gcc.c:4172 #23 0x00011cb4 in do_spec (spec=) at ../../src/gcc/gcc.c:4139 #24 0x00014454 in main (argc=41, argv=0xbe82f4f4) at ../../src/gcc/gcc.c:6723 23MB core file available at: http://people.debian.org/~zumbi/tmp/core Cheers