public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/35620]  New: ICE passing dereferenced pointer to _Decimal32
@ 2008-03-18  0:05 janis at gcc dot gnu dot org
  2008-03-25 21:29 ` [Bug target/35620] " janis at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: janis at gcc dot gnu dot org @ 2008-03-18  0:05 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2096 bytes --]

This source code, compiled on powerpc-linux with -O1, results in an internal
compiler error since Peter Bergner's change to pass SDmode arguments in
floating point registers:

    extern void bar (_Decimal32);
    _Decimal32 *p;
    void
    foo (void)
    {
      bar (*p);
    }

The error message:

    elm3b145% /opt/gcc-nightly/trunk/bin/gcc -c -O1 bug.c
    bug.c: In function ‘foo’:
    bug.c:8: internal compiler error: in rs6000_secondary_memory_needed_rtx, at
config/rs6000/rs6000.c:11204
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <http://gcc.gnu.org/bugs.html> for instructions.

It compiles cleanly with "-O1 -fno-tree-ter".

The problem is that TER removes a temporary added to dereference "p" and
instead passes *p directly.  Code in rs6000_check_sdmode, a function Peter
added to determine whether a function needs a stack slot for passing SDmode
arguments, doesn't look for a dereference and so the temporary stack slot isn't
created.

This might fix it, but rather than jumping in and testing it thoroughly I'll
talk to Peter about it when he returns from vacation.

Index: rs6000.c
===================================================================
--- rs6000.c    (revision 133292)
+++ rs6000.c    (working copy)
@@ -11230,6 +11230,7 @@ rs6000_check_sdmode (tree *tp, int *walk
     case FIELD_DECL:
     case RESULT_DECL:
     case REAL_CST:
+    case INDIRECT_REF:
       if (TYPE_MODE (TREE_TYPE (*tp)) == SDmode)
        return *tp;
       break;

This is a regression in GCC 4.3 (where the previous code didn't comply with the
ABI) and on mainline.


-- 
           Summary: ICE passing dereferenced pointer to _Decimal32
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janis at gcc dot gnu dot org
GCC target triplet: powerpc-unknown-linux-gnu


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


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

* [Bug target/35620] ICE passing dereferenced pointer to _Decimal32
  2008-03-18  0:05 [Bug target/35620] New: ICE passing dereferenced pointer to _Decimal32 janis at gcc dot gnu dot org
@ 2008-03-25 21:29 ` janis at gcc dot gnu dot org
  2008-04-04 20:20 ` janis at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: janis at gcc dot gnu dot org @ 2008-03-25 21:29 UTC (permalink / raw)
  To: gcc-bugs



-- 

janis at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |janis at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-03-25 21:28:42
               date|                            |


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


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

* [Bug target/35620] ICE passing dereferenced pointer to _Decimal32
  2008-03-18  0:05 [Bug target/35620] New: ICE passing dereferenced pointer to _Decimal32 janis at gcc dot gnu dot org
  2008-03-25 21:29 ` [Bug target/35620] " janis at gcc dot gnu dot org
@ 2008-04-04 20:20 ` janis at gcc dot gnu dot org
  2008-06-23 19:58 ` bergner at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: janis at gcc dot gnu dot org @ 2008-04-04 20:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from janis at gcc dot gnu dot org  2008-04-04 20:19 -------
Subject: Bug 35620

Author: janis
Date: Fri Apr  4 20:18:52 2008
New Revision: 133909

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133909
Log:
gcc/
        PR target/35620
        * config/rs6000/rs6000.c (rs6000_check_sdmode): Handle indirect ref
        and view convert expression.

testsuite/
        PR target/35620
        * gcc.dg/dfp/pr35620.c: New test.
        * gcc.dg/dfp/func-pointer.c: New test.
        * gcc.dg/dfp/func-deref.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/dfp/func-deref.c
    trunk/gcc/testsuite/gcc.dg/dfp/func-pointer.c
    trunk/gcc/testsuite/gcc.dg/dfp/pr35620.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/rs6000.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/35620] ICE passing dereferenced pointer to _Decimal32
  2008-03-18  0:05 [Bug target/35620] New: ICE passing dereferenced pointer to _Decimal32 janis at gcc dot gnu dot org
  2008-03-25 21:29 ` [Bug target/35620] " janis at gcc dot gnu dot org
  2008-04-04 20:20 ` janis at gcc dot gnu dot org
@ 2008-06-23 19:58 ` bergner at gcc dot gnu dot org
  2008-09-11 17:36 ` janis at gcc dot gnu dot org
  2008-09-18 18:40 ` janis at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: bergner at gcc dot gnu dot org @ 2008-06-23 19:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bergner at gcc dot gnu dot org  2008-06-23 19:57 -------
Janis, is this fixed with your patch so we can close this bugzilla?


-- 


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


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

* [Bug target/35620] ICE passing dereferenced pointer to _Decimal32
  2008-03-18  0:05 [Bug target/35620] New: ICE passing dereferenced pointer to _Decimal32 janis at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-06-23 19:58 ` bergner at gcc dot gnu dot org
@ 2008-09-11 17:36 ` janis at gcc dot gnu dot org
  2008-09-18 18:40 ` janis at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: janis at gcc dot gnu dot org @ 2008-09-11 17:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from janis at gcc dot gnu dot org  2008-09-11 17:35 -------
Fixed on mainline.


-- 

janis at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug target/35620] ICE passing dereferenced pointer to _Decimal32
  2008-03-18  0:05 [Bug target/35620] New: ICE passing dereferenced pointer to _Decimal32 janis at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-09-11 17:36 ` janis at gcc dot gnu dot org
@ 2008-09-18 18:40 ` janis at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: janis at gcc dot gnu dot org @ 2008-09-18 18:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from janis at gcc dot gnu dot org  2008-09-18 18:39 -------
Subject: Bug 35620

Author: janis
Date: Thu Sep 18 18:37:52 2008
New Revision: 140468

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140468
Log:
        Backport from mainline:
        2008-04-08  Janis Johnson  <janis187@us.ibm.com>
gcc/
        PR target/35620
        * config/rs6000/rs6000.c (rs6000_check_sdmode): Handle additional
        kinds of indirect references.
gcc/testsuite/
        PR target/35620
        * gcc.dg/dfp/pr35620.c: New test.
        * gcc.dg/dfp/func-pointer.c: New test.
        * gcc.dg/dfp/func-deref.c: New test.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/dfp/func-deref.c
    branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/dfp/func-pointer.c
    branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/dfp/pr35620.c
Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/config/rs6000/rs6000.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2008-09-18 18:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-18  0:05 [Bug target/35620] New: ICE passing dereferenced pointer to _Decimal32 janis at gcc dot gnu dot org
2008-03-25 21:29 ` [Bug target/35620] " janis at gcc dot gnu dot org
2008-04-04 20:20 ` janis at gcc dot gnu dot org
2008-06-23 19:58 ` bergner at gcc dot gnu dot org
2008-09-11 17:36 ` janis at gcc dot gnu dot org
2008-09-18 18:40 ` janis at gcc dot gnu dot 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).