public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/32441]  New: ICE in expand_expr_real_1, at expr.c:7109
@ 2007-06-20 21:35 rask at sygehus dot dk
  2007-06-20 21:36 ` [Bug target/32441] " rask at sygehus dot dk
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: rask at sygehus dot dk @ 2007-06-20 21:35 UTC (permalink / raw)
  To: gcc-bugs

Here's how I configure GCC:
$ /n/08/rask/src/gcc/configure --target m32c-unknown-elf
--with-newlib--enable-sim --disable-gdb --disable-nls
--enable-languages=c,c++,java

This is how to reproduce the failure:

$ ./xgcc -B./ ~/__dprintf.c -S -dp -o /dev/null -mcpu=m32cm
/n/08/rask/src/gcc/newlib/libc/misc/__dprintf.c: In function '__dprintf':
/n/08/rask/src/gcc/newlib/libc/misc/__dprintf.c:73: internal compiler error: in
expand_expr_real_1, at expr.c:7109


-- 
           Summary: ICE in expand_expr_real_1, at expr.c:7109
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rask at sygehus dot dk
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: m32c-unknown-elf


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


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

* [Bug target/32441] ICE in expand_expr_real_1, at expr.c:7109
  2007-06-20 21:35 [Bug target/32441] New: ICE in expand_expr_real_1, at expr.c:7109 rask at sygehus dot dk
@ 2007-06-20 21:36 ` rask at sygehus dot dk
  2007-06-20 22:05 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rask at sygehus dot dk @ 2007-06-20 21:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rask at sygehus dot dk  2007-06-20 21:36 -------
Created an attachment (id=13750)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13750&action=view)
Preprocessed testcase


-- 


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


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

* [Bug target/32441] ICE in expand_expr_real_1, at expr.c:7109
  2007-06-20 21:35 [Bug target/32441] New: ICE in expand_expr_real_1, at expr.c:7109 rask at sygehus dot dk
  2007-06-20 21:36 ` [Bug target/32441] " rask at sygehus dot dk
@ 2007-06-20 22:05 ` pinskia at gcc dot gnu dot org
  2007-06-21  8:58 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-20 22:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-06-20 22:05 -------
This is more likely related to pointer_plus than dataflow.

Looking into it.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org


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


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

* [Bug target/32441] ICE in expand_expr_real_1, at expr.c:7109
  2007-06-20 21:35 [Bug target/32441] New: ICE in expand_expr_real_1, at expr.c:7109 rask at sygehus dot dk
  2007-06-20 21:36 ` [Bug target/32441] " rask at sygehus dot dk
  2007-06-20 22:05 ` pinskia at gcc dot gnu dot org
@ 2007-06-21  8:58 ` pinskia at gcc dot gnu dot org
  2007-06-21 11:00 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-21  8:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-06-21 08:58 -------
Patch which fixes this bug:
Index: builtins.c
===================================================================
--- builtins.c  (revision 125776)
+++ builtins.c  (working copy)
@@ -4649,7 +4649,18 @@
 std_expand_builtin_va_start (tree valist, rtx nextarg)
 {
   tree t;
-  t = make_tree (sizetype, nextarg);
+  /* Use the correct type/mode for make_tree, can't use a pointer type as
+     PLUS_EXPR is not appliable to pointers.  type_for_mode might return
+     a type with a different mode (SI vs PSI) so we might need to convert
+     to the different mode.  */
+  tree type = lang_hooks.types.type_for_mode (TYPE_MODE (ptr_type_node),
true);
+  if (TYPE_MODE (type) != GET_MODE (nextarg))
+    {
+      rtx reg = gen_reg_rtx (TYPE_MODE (type));
+      convert_move (reg, nextarg, false);
+      nextarg = reg;
+    }
+  t = make_tree (type, nextarg);
   t = fold_convert (ptr_type_node, t);

   t = build2 (MODIFY_EXPR, TREE_TYPE (valist), valist, t);


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-06-21 08:58:35
               date|                            |


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


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

* [Bug target/32441] ICE in expand_expr_real_1, at expr.c:7109
  2007-06-20 21:35 [Bug target/32441] New: ICE in expand_expr_real_1, at expr.c:7109 rask at sygehus dot dk
                   ` (2 preceding siblings ...)
  2007-06-21  8:58 ` pinskia at gcc dot gnu dot org
@ 2007-06-21 11:00 ` rguenth at gcc dot gnu dot org
  2007-06-21 13:48 ` pinskia at gmail dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-06-21 11:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2007-06-21 11:00 -------
You shouldn't introduce calls to langhooks.  Why not use mode_for_size?


-- 


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


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

* [Bug target/32441] ICE in expand_expr_real_1, at expr.c:7109
  2007-06-20 21:35 [Bug target/32441] New: ICE in expand_expr_real_1, at expr.c:7109 rask at sygehus dot dk
                   ` (3 preceding siblings ...)
  2007-06-21 11:00 ` rguenth at gcc dot gnu dot org
@ 2007-06-21 13:48 ` pinskia at gmail dot com
  2007-06-21 22:47 ` [Bug target/32441] [4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gmail dot com @ 2007-06-21 13:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gmail dot com  2007-06-21 13:47 -------
Subject: Re:  ICE in expand_expr_real_1, at expr.c:7109

> You shouldn't introduce calls to langhooks.  Why not use mode_for_size?

I was just copying code from fold-const.c. I have the mode already, I
need an integer tree type that matches that mode.  So really
mode_for_size will not give me any more information.


-- Pinski


-- 


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


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

* [Bug target/32441] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:7109
  2007-06-20 21:35 [Bug target/32441] New: ICE in expand_expr_real_1, at expr.c:7109 rask at sygehus dot dk
                   ` (4 preceding siblings ...)
  2007-06-21 13:48 ` pinskia at gmail dot com
@ 2007-06-21 22:47 ` pinskia at gcc dot gnu dot org
  2007-06-29 18:52 ` [Bug middle-end/32441] " mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-21 22:47 UTC (permalink / raw)
  To: gcc-bugs



-- 

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|NEW                         |ASSIGNED
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
           Keywords|                            |build, ice-on-valid-code
            Summary|ICE in expand_expr_real_1,  |[4.3 Regression] ICE in
                   |at expr.c:7109              |expand_expr_real_1, at
                   |                            |expr.c:7109
   Target Milestone|---                         |4.3.0


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


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

* [Bug middle-end/32441] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:7109
  2007-06-20 21:35 [Bug target/32441] New: ICE in expand_expr_real_1, at expr.c:7109 rask at sygehus dot dk
                   ` (5 preceding siblings ...)
  2007-06-21 22:47 ` [Bug target/32441] [4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-06-29 18:52 ` mmitchel at gcc dot gnu dot org
  2007-07-06 13:45 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-06-29 18:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mmitchel at gcc dot gnu dot org  2007-06-29 18:52 -------
There is nothing wrong with langhooks per se.

The problem is langhooks that influence the interpretation of the IR, not
langhooks that are used to *create* the IR.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug middle-end/32441] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:7109
  2007-06-20 21:35 [Bug target/32441] New: ICE in expand_expr_real_1, at expr.c:7109 rask at sygehus dot dk
                   ` (6 preceding siblings ...)
  2007-06-29 18:52 ` [Bug middle-end/32441] " mmitchel at gcc dot gnu dot org
@ 2007-07-06 13:45 ` rguenth at gcc dot gnu dot org
  2007-07-06 17:58 ` zack at gcc dot gnu dot org
  2007-07-06 17:59 ` zackw at panix dot com
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-07-06 13:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2007-07-06 13:44 -------
Even if this IR is created at expansion time?


-- 


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


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

* [Bug middle-end/32441] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:7109
  2007-06-20 21:35 [Bug target/32441] New: ICE in expand_expr_real_1, at expr.c:7109 rask at sygehus dot dk
                   ` (7 preceding siblings ...)
  2007-07-06 13:45 ` rguenth at gcc dot gnu dot org
@ 2007-07-06 17:58 ` zack at gcc dot gnu dot org
  2007-07-06 17:59 ` zackw at panix dot com
  9 siblings, 0 replies; 11+ messages in thread
From: zack at gcc dot gnu dot org @ 2007-07-06 17:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from zackw at panix dot com  2007-07-06 17:58 -------
Subject: Bug 32441

Author: zack
Date: Fri Jul  6 17:57:58 2007
New Revision: 126424

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126424
Log:
2007-07-06  Ian Lance Taylor  <iant@google.com>
            Zack Weinberg  <zackw@panix.com>

        PR middle-end/32441
        * builtins.c (std_expand_builtin_va_start): Don't use make_tree.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c


-- 


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


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

* [Bug middle-end/32441] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:7109
  2007-06-20 21:35 [Bug target/32441] New: ICE in expand_expr_real_1, at expr.c:7109 rask at sygehus dot dk
                   ` (8 preceding siblings ...)
  2007-07-06 17:58 ` zack at gcc dot gnu dot org
@ 2007-07-06 17:59 ` zackw at panix dot com
  9 siblings, 0 replies; 11+ messages in thread
From: zackw at panix dot com @ 2007-07-06 17:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from zackw at panix dot com  2007-07-06 17:59 -------
Ian Taylor and I found a simpler patch that does not use langhooks, and also
has the virtue of working. ;-)  Committed as rev 126424.


-- 

zackw at panix dot com changed:

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


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


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

end of thread, other threads:[~2007-07-06 17:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-20 21:35 [Bug target/32441] New: ICE in expand_expr_real_1, at expr.c:7109 rask at sygehus dot dk
2007-06-20 21:36 ` [Bug target/32441] " rask at sygehus dot dk
2007-06-20 22:05 ` pinskia at gcc dot gnu dot org
2007-06-21  8:58 ` pinskia at gcc dot gnu dot org
2007-06-21 11:00 ` rguenth at gcc dot gnu dot org
2007-06-21 13:48 ` pinskia at gmail dot com
2007-06-21 22:47 ` [Bug target/32441] [4.3 Regression] " pinskia at gcc dot gnu dot org
2007-06-29 18:52 ` [Bug middle-end/32441] " mmitchel at gcc dot gnu dot org
2007-07-06 13:45 ` rguenth at gcc dot gnu dot org
2007-07-06 17:58 ` zack at gcc dot gnu dot org
2007-07-06 17:59 ` zackw at panix 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).