public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38489]  New: [c++0x] ICE in digest_init_r, at cp/typeck2.c:821 on "auto t = 0r;" (fixed fp)
@ 2008-12-11 17:03 cfairles at gcc dot gnu dot org
  2008-12-12 16:02 ` [Bug c++/38489] " cfairles at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: cfairles at gcc dot gnu dot org @ 2008-12-11 17:03 UTC (permalink / raw)
  To: gcc-bugs

int main() {
  auto t = 0r;
}

Compile with -std=c++0x

error: fixed-point constants are a GCC extension
In function 'int main(int, char**)':
internal compiler error: in digest_init_r, at cp/typeck2.c:821


-- 
           Summary: [c++0x] ICE in digest_init_r, at cp/typeck2.c:821 on
                    "auto t = 0r;" (fixed fp)
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: error-recovery
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cfairles at gcc dot gnu dot org
 GCC build triplet: x86_64-redhat-linux
  GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux


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


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

* [Bug c++/38489] [c++0x] ICE in digest_init_r, at cp/typeck2.c:821 on "auto t = 0r;" (fixed fp)
  2008-12-11 17:03 [Bug c++/38489] New: [c++0x] ICE in digest_init_r, at cp/typeck2.c:821 on "auto t = 0r;" (fixed fp) cfairles at gcc dot gnu dot org
@ 2008-12-12 16:02 ` cfairles at gcc dot gnu dot org
  2008-12-23 19:14 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: cfairles at gcc dot gnu dot org @ 2008-12-12 16:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from cfairles at gcc dot gnu dot org  2008-12-12 15:59 -------
cc'ing Jason


-- 

cfairles at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at redhat dot com


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


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

* [Bug c++/38489] [c++0x] ICE in digest_init_r, at cp/typeck2.c:821 on "auto t = 0r;" (fixed fp)
  2008-12-11 17:03 [Bug c++/38489] New: [c++0x] ICE in digest_init_r, at cp/typeck2.c:821 on "auto t = 0r;" (fixed fp) cfairles at gcc dot gnu dot org
  2008-12-12 16:02 ` [Bug c++/38489] " cfairles at gcc dot gnu dot org
@ 2008-12-23 19:14 ` pinskia at gcc dot gnu dot org
  2008-12-24  4:03 ` pinskia at gcc dot gnu dot org
  2009-02-19  7:17 ` reichelt at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-23 19:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2008-12-23 19:12 -------
I have a simple fix:
Index: cp-tree.h
===================================================================
--- cp-tree.h   (revision 142906)
+++ cp-tree.h   (working copy)
@@ -2701,7 +2701,8 @@ more_aggr_init_expr_args_p (const aggr_i
 #define ARITHMETIC_TYPE_P(TYPE) \
   (CP_INTEGRAL_TYPE_P (TYPE) \
    || TREE_CODE (TYPE) == REAL_TYPE \
-   || TREE_CODE (TYPE) == COMPLEX_TYPE)
+   || TREE_CODE (TYPE) == COMPLEX_TYPE \
+   || TREE_CODE (TYPE) == FIXED_POINT_TYPE)

 /* [basic.types]


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-12-23 19:12:54
               date|                            |


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


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

* [Bug c++/38489] [c++0x] ICE in digest_init_r, at cp/typeck2.c:821 on "auto t = 0r;" (fixed fp)
  2008-12-11 17:03 [Bug c++/38489] New: [c++0x] ICE in digest_init_r, at cp/typeck2.c:821 on "auto t = 0r;" (fixed fp) cfairles at gcc dot gnu dot org
  2008-12-12 16:02 ` [Bug c++/38489] " cfairles at gcc dot gnu dot org
  2008-12-23 19:14 ` pinskia at gcc dot gnu dot org
@ 2008-12-24  4:03 ` pinskia at gcc dot gnu dot org
  2009-02-19  7:17 ` reichelt at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-24  4:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2008-12-24 04:00 -------
This code is valid and should be accepted.  I wonder how many other fixed point
type issues we can find in the C++ front-end.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2008-
                   |                            |12/msg01152.html
  GCC build triplet|x86_64-redhat-linux         |
   GCC host triplet|x86_64-redhat-linux         |
 GCC target triplet|x86_64-redhat-linux         |
           Keywords|error-recovery              |ice-on-valid-code, patch


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


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

* [Bug c++/38489] [c++0x] ICE in digest_init_r, at cp/typeck2.c:821 on "auto t = 0r;" (fixed fp)
  2008-12-11 17:03 [Bug c++/38489] New: [c++0x] ICE in digest_init_r, at cp/typeck2.c:821 on "auto t = 0r;" (fixed fp) cfairles at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-12-24  4:03 ` pinskia at gcc dot gnu dot org
@ 2009-02-19  7:17 ` reichelt at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-02-19  7:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from reichelt at gcc dot gnu dot org  2009-02-19 07:16 -------
Fixed-point constants are rejected by the C++ frontend since the patch for
PR39059.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
           Keywords|ice-on-valid-code           |ice-on-invalid-code
         Resolution|                            |FIXED
   Target Milestone|---                         |4.4.0


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


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

end of thread, other threads:[~2009-02-19  7:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-11 17:03 [Bug c++/38489] New: [c++0x] ICE in digest_init_r, at cp/typeck2.c:821 on "auto t = 0r;" (fixed fp) cfairles at gcc dot gnu dot org
2008-12-12 16:02 ` [Bug c++/38489] " cfairles at gcc dot gnu dot org
2008-12-23 19:14 ` pinskia at gcc dot gnu dot org
2008-12-24  4:03 ` pinskia at gcc dot gnu dot org
2009-02-19  7:17 ` reichelt 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).