public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/11476] New: gcc ICE on newlib's vfprintf.c
@ 2003-07-09 14:55 dhazeghi at yahoo dot com
  2003-07-09 14:56 ` [Bug target/11476] " dhazeghi at yahoo dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-07-09 14:55 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: gcc ICE on newlib's vfprintf.c
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dhazeghi at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: arc-elf32

With gcc mainline (20030707) and the patch for 11043, when building a combined tree for arc-
elf32, I get:

Making all in stdio
make[4]: Entering directory `/home/dara/mainline/objdir/arc-elf32/newlib/libc/stdio'
/home/dara/mainline/objdir/gcc/xgcc -B/home/dara/mainline/objdir/gcc/ -nostdinc -B/home/
dara/mainline/objdir/arc-elf32/newlib/ -isystem /home/dara/mainline/objdir/arc-elf32/newlib/
targ-include -isystem /home/dara/mainline/src/newlib/libc/include -B/usr/local/arc-elf32/arc-
elf32/bin/ -B/usr/local/arc-elf32/arc-elf32/lib/ -isystem /usr/local/arc-elf32/arc-elf32/include 
-isystem /usr/local/arc-elf32/arc-elf32/sys-include -L/home/dara/mainline/objdir/ld -
DPACKAGE=\"newlib\" -DVERSION=\"1.11.0\"  -I. -I../../../../../src/newlib/libc/stdio  -O2 -fno-
builtin    -O2 -g -O2  -O2 -O2 -save-temps -fshort-enums -c ../../../../../src/newlib/libc/stdio/
vfprintf.c
../../../../../src/newlib/libc/stdio/vfprintf.c: In function `_vfprintf_r':
../../../../../src/newlib/libc/stdio/vfprintf.c:767: internal compiler error: in build, at tree.c:2378
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [vfprintf.o] Error 1
make[4]: Leaving directory `/home/dara/mainline/objdir/arc-elf32/newlib/libc/stdio'

Testcase also failes with -O0.


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

* [Bug target/11476] gcc ICE on newlib's vfprintf.c
  2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
@ 2003-07-09 14:56 ` dhazeghi at yahoo dot com
  2003-07-09 16:05 ` pinskia at physics dot uc dot edu
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-07-09 14:56 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From dhazeghi at yahoo dot com  2003-07-09 14:56 -------
Created an attachment (id=4369)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4369&action=view)
testcase from newlib


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

* [Bug target/11476] gcc ICE on newlib's vfprintf.c
  2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
  2003-07-09 14:56 ` [Bug target/11476] " dhazeghi at yahoo dot com
@ 2003-07-09 16:05 ` pinskia at physics dot uc dot edu
  2003-07-09 22:29 ` neroden at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-09 16:05 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-09 16:05:07
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-09 16:05 -------
I can confirm this on the mainline (20030709):
Here is the simplified case:
typedef __builtin_va_list __gnuc_va_list;
typedef __gnuc_va_list va_list;

int
_vfprintf_r(int i , va_list ap)
{
 __builtin_va_arg(ap,long double);
}


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

* [Bug target/11476] gcc ICE on newlib's vfprintf.c
  2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
  2003-07-09 14:56 ` [Bug target/11476] " dhazeghi at yahoo dot com
  2003-07-09 16:05 ` pinskia at physics dot uc dot edu
@ 2003-07-09 22:29 ` neroden at gcc dot gnu dot org
  2003-08-21 18:32 ` dhazeghi at yahoo dot com
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: neroden at gcc dot gnu dot org @ 2003-07-09 22:29 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


neroden at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED


------- Additional Comments From neroden at gcc dot gnu dot org  2003-07-09 22:29 -------
Suspending until ARC gets a maintainer.


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

* [Bug target/11476] gcc ICE on newlib's vfprintf.c
  2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
                   ` (2 preceding siblings ...)
  2003-07-09 22:29 ` neroden at gcc dot gnu dot org
@ 2003-08-21 18:32 ` dhazeghi at yahoo dot com
  2003-08-21 18:36 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-21 18:32 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From dhazeghi at yahoo dot com  2003-08-21 18:32 -------
FWIW it's still present on mainline (20030821).


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

* [Bug target/11476] gcc ICE on newlib's vfprintf.c
  2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
                   ` (3 preceding siblings ...)
  2003-08-21 18:32 ` dhazeghi at yahoo dot com
@ 2003-08-21 18:36 ` pinskia at gcc dot gnu dot org
  2003-08-21 18:48 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-21 18:36 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|SUSPENDED                   |NEW
   Last reconfirmed|2003-07-09 16:05:07         |2003-08-21 18:36:28
               date|                            |


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-21 18:36 -------
I think the problem is that the "long double" type is 0 aka not defined as something or arc does 
not support "long double" in __builtin_va_arg yet.


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

* [Bug target/11476] gcc ICE on newlib's vfprintf.c
  2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
                   ` (4 preceding siblings ...)
  2003-08-21 18:36 ` pinskia at gcc dot gnu dot org
@ 2003-08-21 18:48 ` pinskia at gcc dot gnu dot org
  2003-08-22 23:51 ` [Bug target/11476] [arc-elf] " dhazeghi at yahoo dot com
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-21 18:48 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-21 18:48 -------
This should be suspended still.


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

* [Bug target/11476] [arc-elf] gcc ICE on newlib's vfprintf.c
  2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
                   ` (5 preceding siblings ...)
  2003-08-21 18:48 ` pinskia at gcc dot gnu dot org
@ 2003-08-22 23:51 ` dhazeghi at yahoo dot com
  2004-02-05 21:23 ` rdaddio at adelphia dot net
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-22 23:51 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|gcc ICE on newlib's         |[arc-elf] gcc ICE on
                   |vfprintf.c                  |newlib's vfprintf.c
   Target Milestone|3.4                         |---


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

* [Bug target/11476] [arc-elf] gcc ICE on newlib's vfprintf.c
  2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
                   ` (6 preceding siblings ...)
  2003-08-22 23:51 ` [Bug target/11476] [arc-elf] " dhazeghi at yahoo dot com
@ 2004-02-05 21:23 ` rdaddio at adelphia dot net
  2004-08-31  3:36 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rdaddio at adelphia dot net @ 2004-02-05 21:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rdaddio at adelphia dot net  2004-02-05 21:23 -------
This is caused by a lack of long double support.

Also anything else that requires floating point support will
probably fail as well, since soft-float is not support either.

-- 


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


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

* [Bug target/11476] [arc-elf] gcc ICE on newlib's vfprintf.c
  2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
                   ` (7 preceding siblings ...)
  2004-02-05 21:23 ` rdaddio at adelphia dot net
@ 2004-08-31  3:36 ` pinskia at gcc dot gnu dot org
  2004-09-04 10:39 ` ramana dot radhakrishnan at codito dot com
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-31  3:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-31 03:36 -------
*** Bug 17240 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ramana dot radhakrishnan at
                   |                            |codito dot com


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


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

* [Bug target/11476] [arc-elf] gcc ICE on newlib's vfprintf.c
  2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
                   ` (8 preceding siblings ...)
  2004-08-31  3:36 ` pinskia at gcc dot gnu dot org
@ 2004-09-04 10:39 ` ramana dot radhakrishnan at codito dot com
  2004-09-07  7:39 ` [Bug target/11476] [3.4 only] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ramana dot radhakrishnan at codito dot com @ 2004-09-04 10:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ramana dot radhakrishnan at codito dot com  2004-09-04 10:39 -------
In continuation with this bug, we figured out that there were a few calls to
build with unary operators without side effects. The exact place in tree.c where
this fails had the following comment . 

--- tree.c 
  /* The only one-operand cases we handle here are those with side-effects.
	 Others are handled with build1.  So don't bother checked if the
	 arg has side-effects since we'll already have set it.

	 ??? This really should use build1 too.  */
      if (TREE_CODE_CLASS (code) != 's')
	abort ();

In the case for all these aborts the nodes being passed were unary operators,
for example (INDIRECT_REF which has a code of 'r' ) which is not a side effect
unary node. 


The following patch fixes this .

---ChangeLog 
2004-09-04 Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>

PR/ 11476

arc.c 
  * Fix calls to build for unary operators without sideeffects for ARC. 



--- arc.c.orig  2004-09-04 16:00:15.000000000 +0530
+++ arc.c       2004-09-04 16:00:42.000000000 +0530
@@ -2284,8 +2284,8 @@
     {
       tree type_ptr_ptr = build_pointer_type (type_ptr);

-      addr = build (INDIRECT_REF, type_ptr,
-                   build (NOP_EXPR, type_ptr_ptr, valist));
+      addr = build1 (INDIRECT_REF, type_ptr,
+                   build1 (NOP_EXPR, type_ptr_ptr, valist));

       incr = build (PLUS_EXPR, TREE_TYPE (valist),
                    valist, build_int_2 (UNITS_PER_WORD, 0));
@@ -2305,12 +2305,12 @@
        {
          /* AP = (TYPE *)(((int)AP + 7) & -8)  */

-         addr = build (NOP_EXPR, integer_type_node, valist);
+         addr = build1 (NOP_EXPR, integer_type_node, valist);
          addr = fold (build (PLUS_EXPR, integer_type_node, addr,
                              build_int_2 (7, 0)));
          addr = fold (build (BIT_AND_EXPR, integer_type_node, addr,
                              build_int_2 (-8, 0)));
-         addr = fold (build (NOP_EXPR, TREE_TYPE (valist), addr));
+         addr = fold (build1 (NOP_EXPR, TREE_TYPE (valist), addr));
        }

       /* The increment is always rounded_size past the aligned pointer.  */


and continues with the build.






-- 


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


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

* [Bug target/11476] [3.4 only] [arc-elf] gcc ICE on newlib's vfprintf.c
  2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
                   ` (9 preceding siblings ...)
  2004-09-04 10:39 ` ramana dot radhakrishnan at codito dot com
@ 2004-09-07  7:39 ` pinskia at gcc dot gnu dot org
  2004-09-11 21:15 ` cvs-commit at gcc dot gnu dot org
  2004-09-11 21:19 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-07  7:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-07 07:39 -------
I should note that is only for 3.4 as 3.5 changes how fold works and now build1 is really called when 
build is called with one parameter.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[arc-elf] gcc ICE on        |[3.4 only] [arc-elf] gcc ICE
                   |newlib's vfprintf.c         |on newlib's vfprintf.c
   Target Milestone|---                         |3.4.3


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


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

* [Bug target/11476] [3.4 only] [arc-elf] gcc ICE on newlib's vfprintf.c
  2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
                   ` (10 preceding siblings ...)
  2004-09-07  7:39 ` [Bug target/11476] [3.4 only] " pinskia at gcc dot gnu dot org
@ 2004-09-11 21:15 ` cvs-commit at gcc dot gnu dot org
  2004-09-11 21:19 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-11 21:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-11 21:15 -------
Subject: Bug 11476

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	pinskia@gcc.gnu.org	2004-09-11 21:15:21

Modified files:
	gcc            : ChangeLog 
	gcc/config/arc : arc.c 

Log message:
	2004-09-11  Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
	
	PR target/11476
	* gcc/config/arc/arc.c (arc_va_args): Call build1 instead
	of build for unary tree operators.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.619&r2=2.2326.2.620
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arc/arc.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.46.4.1&r2=1.46.4.2



-- 


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


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

* [Bug target/11476] [3.4 only] [arc-elf] gcc ICE on newlib's vfprintf.c
  2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
                   ` (11 preceding siblings ...)
  2004-09-11 21:15 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-11 21:19 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-11 21:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-11 21:19 -------
Fixed.  I should note this does not need fixing on the mainline because of the change in build and that 
the code which did this was removed.

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


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


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

end of thread, other threads:[~2004-09-11 21:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-09 14:55 [Bug target/11476] New: gcc ICE on newlib's vfprintf.c dhazeghi at yahoo dot com
2003-07-09 14:56 ` [Bug target/11476] " dhazeghi at yahoo dot com
2003-07-09 16:05 ` pinskia at physics dot uc dot edu
2003-07-09 22:29 ` neroden at gcc dot gnu dot org
2003-08-21 18:32 ` dhazeghi at yahoo dot com
2003-08-21 18:36 ` pinskia at gcc dot gnu dot org
2003-08-21 18:48 ` pinskia at gcc dot gnu dot org
2003-08-22 23:51 ` [Bug target/11476] [arc-elf] " dhazeghi at yahoo dot com
2004-02-05 21:23 ` rdaddio at adelphia dot net
2004-08-31  3:36 ` pinskia at gcc dot gnu dot org
2004-09-04 10:39 ` ramana dot radhakrishnan at codito dot com
2004-09-07  7:39 ` [Bug target/11476] [3.4 only] " pinskia at gcc dot gnu dot org
2004-09-11 21:15 ` cvs-commit at gcc dot gnu dot org
2004-09-11 21:19 ` pinskia 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).