public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/56361] New: assertion failure passing structs w/o fields by value on sparc64
@ 2013-02-17 10:11 jay.krell at cornell dot edu
  2013-02-20 18:57 ` [Bug target/56361] " ebotcazou at gcc dot gnu.org
  2013-12-11 13:18 ` ebotcazou at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jay.krell at cornell dot edu @ 2013-02-17 10:11 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56361

             Bug #: 56361
           Summary: assertion failure passing structs w/o fields by value
                    on sparc64
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jay.krell@cornell.edu


We have a strange front end.
It declares structs with size but no fields.
It actually works..except sometimes for SPARC64.


We have a function that passes a few structs by value.
They are 12 bytes each.



4.7.2/config/sparc/sparc.c:
static rtx
function_arg_record_value (const_tree type, enum machine_mode mode,
               int slotno, int named, int regbase)
.
.
.

      else
    {
      /* ??? C++ has structures with no fields, and yet a size.  Give up
         for now and pass everything back in integer registers.  */
      nregs = (typesize + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
    }
      if (nregs + slotno > SPARC_INT_ARG_MAX)
    nregs = SPARC_INT_ARG_MAX - slotno;
    }
  gcc_assert (nregs != 0);



SPARC_INT_ARG_MAX == 6
nregs = 2
slotno = 6
so then nregs = 0
and the assert fails


I think it should say:
  gcc_assert (nregs != 0 || parms.stack);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/56361] assertion failure passing structs w/o fields by value on sparc64
  2013-02-17 10:11 [Bug target/56361] New: assertion failure passing structs w/o fields by value on sparc64 jay.krell at cornell dot edu
@ 2013-02-20 18:57 ` ebotcazou at gcc dot gnu.org
  2013-12-11 13:18 ` ebotcazou at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2013-02-20 18:57 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56361

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2013-02-20
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2013-02-20 18:57:04 UTC ---
That could make sense if you confirm that the generated code runs correctly
once the assertion is relaxed.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/56361] assertion failure passing structs w/o fields by value on sparc64
  2013-02-17 10:11 [Bug target/56361] New: assertion failure passing structs w/o fields by value on sparc64 jay.krell at cornell dot edu
  2013-02-20 18:57 ` [Bug target/56361] " ebotcazou at gcc dot gnu.org
@ 2013-12-11 13:18 ` ebotcazou at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2013-12-11 13:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56361

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
No feedback.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-11 13:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-17 10:11 [Bug target/56361] New: assertion failure passing structs w/o fields by value on sparc64 jay.krell at cornell dot edu
2013-02-20 18:57 ` [Bug target/56361] " ebotcazou at gcc dot gnu.org
2013-12-11 13:18 ` ebotcazou at gcc dot gnu.org

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