public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ro at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug modula2/105392] New: SEGV compiling gm2-libs-pim/BitBlockOps.mod on SPARC
Date: Tue, 26 Apr 2022 11:30:22 +0000	[thread overview]
Message-ID: <bug-105392-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 105392
           Summary: SEGV compiling gm2-libs-pim/BitBlockOps.mod on SPARC
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
            Target: sparc-sun-solaris2.11

With the fixes/hacks for PRs 105388 and 105390 in place, current devel/modula-2
branch can build the compiler on Solaris/SPARC.  However, I get a couple of
SEGVs
building libgm2:

/var/gcc/gcc-12.0.1-20220424/11.4-gm2/./gcc/gm2
-B/var/gcc/gcc-12.0.1-20220424/11.4-gm2/./gcc/ -c -g -O2 -g -O2 -I../libm2pim
-I/vol/gcc/src/hg/master/modula-2/gcc/m2/gm2-libs-pim
-I/vol/gcc/src/hg/master/modula-2/gcc/m2/gm2-libs
-I/vol/gcc/src/hg/master/modula-2/gcc/m2/gm2-libs-iso
/vol/gcc/src/hg/master/modula-2/libgm2/libm2log/../../gcc/m2/gm2-libs-pim/BitBlockOps.mod
 -fPIC -DPIC -o .libs/BitBlockOps.o

Using a debug build to get more information, I get

Thread 2 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
0xffbfd7f4 in ?? ()
(gdb) where
#0  0xffbfd7f4 in ?? ()
#1  0x00c786f0 in m2statement_BuildUnaryForeachWordDo (location=3586091,
type=<type_decl 0xfa820630 BITSET>, op1=<var_decl 0xfa868840 _T89>,
op2=<var_decl 0xfa8687e8 _T88>, unop=0xffbfd7f4, is_op1lvalue=0,
is_op2lvalue=1, is_op1const=0, is_op2const=0) at
/vol/gcc/src/hg/master/modula-2/gcc/m2/gm2-gcc/m2statement.cc:603
#2  0x00cfed6c in CodeUnarySet (unop=..., doOp=..., quad=287, result=2943,
expr=2942) at m2/gm2-compiler-boot/M2GenGCC.c:5909
#3  0x00d008c8 in CodeNegateChecked (quad=287, op1=2943, op3=2942) at
m2/gm2-compiler-boot/M2GenGCC.c:6446
#4  0x00cf26a4 in CodeStatement (q=287) at m2/gm2-compiler-boot/M2GenGCC.c:1792
#5  0x00d07ff8 in M2GenGCC_ConvertQuadsToTree (Start=287, End=331) at
m2/gm2-compiler-boot/M2GenGCC.c:8344
#6  0x00d380dc in M2Scope_ForeachScopeBlockDo (sb=0x36c7c28, p=...) at
m2/gm2-compiler-boot/M2Scope.c:638
#7  0x00cf1cf4 in M2Code_CodeBlock (scope=473) at
m2/gm2-compiler-boot/M2Code.c:511
#8  0x00d32fc4 in Lists_ForeachItemInListDo (l=0x35473a0, P=...) at
m2/gm2-compiler-boot/Lists.c:393
#9  0x00ce352c in SymbolTable_ForeachProcedureDo (Sym=155, P=...) at
m2/gm2-compiler-boot/SymbolTable.c:13316
#10 0x00cf1ef8 in M2Code_CodeBlock (scope=155) at
m2/gm2-compiler-boot/M2Code.c:543
#11 0x00cf1274 in DoCodeBlock () at m2/gm2-compiler-boot/M2Code.c:274
#12 0x00cf1b34 in M2Code_Code () at m2/gm2-compiler-boot/M2Code.c:474
#13 0x00cc5eb8 in Compile (s=0x3540de8) at m2/gm2-compiler-boot/M2Comp.c:211
#14 0x00cc7194 in M2Comp_compile (filename=0xffbfe72d) at
m2/gm2-compiler-boot/M2Comp.c:727
#15 0x00c858e0 in init_PerCompilationInit (filename=0xffbfe72d
"/vol/gcc/src/hg/master/modula-2/libgm2/libm2log/../../gcc/m2/gm2-libs-pim/BitBlockOps.mod")
at /vol/gcc/src/hg/master/modula-2/gcc/m2/gm2-gcc/init.cc:195
#16 0x00c2d64c in gm2_parse_input_files (filenames=0x34ff2a8, filename_count=1)
at /vol/gcc/src/hg/master/modula-2/gcc/m2/gm2-lang.cc:470
#17 0x00c2d6a8 in gm2_langhook_parse_file () at
/vol/gcc/src/hg/master/modula-2/gcc/m2/gm2-lang.cc:476
#18 0x018448ec in compile_file () at
/vol/gcc/src/hg/master/modula-2/gcc/toplev.cc:452
#19 0x018498c0 in do_compile (no_backend=false) at
/vol/gcc/src/hg/master/modula-2/gcc/toplev.cc:2168
#20 0x01849e88 in toplev::main (this=0xffbfe012, argc=41, argv=0xffbfe07c) at
/vol/gcc/src/hg/master/modula-2/gcc/toplev.cc:2320
#21 0x02c11d2c in main (argc=41, argv=0xffbfe07c) at
/vol/gcc/src/hg/master/modula-2/gcc/main.cc:39

             reply	other threads:[~2022-04-26 11:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26 11:30 ro at gcc dot gnu.org [this message]
2022-11-10 13:06 ` [Bug modula2/105392] " ro at gcc dot gnu.org
2022-11-10 13:07 ` ro at gcc dot gnu.org
2022-11-10 13:07 ` ro at gcc dot gnu.org
2022-11-23 14:55 ` gaius at gcc dot gnu.org
2022-11-23 15:11 ` gaius at gcc dot gnu.org

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-105392-4@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: 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).