public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113391] New: Assertion failure when MSP430 operand modifier J is used with a non-constant value
@ 2024-01-14 18:04 seanga2 at gmail dot com
  0 siblings, 0 replies; only message in thread
From: seanga2 at gmail dot com @ 2024-01-14 18:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113391
           Summary: Assertion failure when MSP430 operand modifier J is
                    used with a non-constant value
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seanga2 at gmail dot com
  Target Milestone: ---

The following program

unsigned char src;

int main(void)
{
    unsigned int tmp = 0x1234;
    unsigned int dst = 2;

    src = 1;
    asm(".set off, %J[off]\n\t"
        "add.b off(%[base]), %[dst]\n\t"
        : [dst] "+r" (dst)
        : [off] "i" ((unsigned int)&src - tmp), [base] "r" (tmp), "m" (src));
    return dst != 3;
}

fails to compile with the following error:

during RTL pass: final
add.c: In function 'main':
add.c:14:1: internal compiler error: in msp430_print_operand, at
config/msp430/msp430.cc:4338
   14 | }
      | ^
0x5fb114 ???
        ../sysdeps/x86_64/start.S:115
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.

The version of the compiler is

$ msp430-elf-gcc --version
msp430-elf-gcc (GCC) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-14 18:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-14 18:04 [Bug target/113391] New: Assertion failure when MSP430 operand modifier J is used with a non-constant value seanga2 at gmail dot com

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).