public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34
@ 2005-01-16 21:11 poirierg at gmail dot com
  2005-01-16 21:15 ` [Bug c/19472] " poirierg at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: poirierg at gmail dot com @ 2005-01-16 21:11 UTC (permalink / raw)
  To: gcc-bugs

A big chunk of inline i386 ASM from the ffmpeg project causes the compiler to
crash. The same code compiles fine with gcc-3.4, 3.3, 2.95

The command line is:
/usr/lib/gcc-snapshot/bin/gcc -I../libvo -I../../libvo -I/usr/X11R6/include
-fno-PIC -g -O4 -march=athlon-xp -mcpu=athlon-xp -pipe -ffast-math
-fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
-c -o libpostproc/postprocess.o libpostproc/postprocess.c -v -save-temps


The compiler output messages are:
In file included from libpostproc/postprocess.c:655:
libpostproc/postprocess_template.c: In function 'postProcess_MMX2':
libpostproc/postprocess_template.c:3511: warning: pointer targets in passing
argument 6 of 'blockCopy_MMX2' differ in signedness
libpostproc/postprocess_template.c:3657: warning: pointer targets in passing
argument 6 of 'blockCopy_MMX2' differ in signedness
libpostproc/postprocess_template.c:3758: warning: pointer targets in passing
argument 4 of 'tempNoiseReducer_MMX2' differ in signedness
libpostproc/postprocess_template.c:3782: warning: pointer targets in passing
argument 4 of 'tempNoiseReducer_MMX2' differ in signedness
libpostproc/postprocess_template.c:3349: internal compiler error: in var_ann, at
tree-flow-inline.h:34
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[2]: *** [libpostproc/postprocess.o] Error 1
make[2]: Leaving directory `/home/guillaume/main/libavcodec'
make[1]: *** [libavcodec/libavcodec.a] Erreur 2
make[1]: Leaving directory `/home/guillaume/main'
make: *** [build-stamp] Erreur 2

-- 
           Summary: compiler internal error: in var_ann, at tree-flow-
                    inline.h:34
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: poirierg at gmail dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: ../src/configure -v --enable-
                    languages=c,c++,java,objc,ada --pre
  GCC host triplet: GNU/Linux Debian SID i386, gcc 4.0.0 20050110
                    (experimental)
GCC target triplet: i386, athlon-xp


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


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

* [Bug c/19472] compiler internal error: in var_ann, at tree-flow-inline.h:34
  2005-01-16 21:11 [Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34 poirierg at gmail dot com
@ 2005-01-16 21:15 ` poirierg at gmail dot com
  2005-01-16 21:19 ` poirierg at gmail dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: poirierg at gmail dot com @ 2005-01-16 21:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From poirierg at gmail dot com  2005-01-16 21:15 -------
Created an attachment (id=7968)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7968&action=view)
a slitghly modified version of postprocess.c from the ffmpeg project


-- 


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


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

* [Bug c/19472] compiler internal error: in var_ann, at tree-flow-inline.h:34
  2005-01-16 21:11 [Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34 poirierg at gmail dot com
  2005-01-16 21:15 ` [Bug c/19472] " poirierg at gmail dot com
@ 2005-01-16 21:19 ` poirierg at gmail dot com
  2005-01-16 21:21 ` poirierg at gmail dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: poirierg at gmail dot com @ 2005-01-16 21:19 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.0.0
      Known to work|                            |3.4.4 3.3.5 2.95.4


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


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

* [Bug c/19472] compiler internal error: in var_ann, at tree-flow-inline.h:34
  2005-01-16 21:11 [Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34 poirierg at gmail dot com
  2005-01-16 21:15 ` [Bug c/19472] " poirierg at gmail dot com
  2005-01-16 21:19 ` poirierg at gmail dot com
@ 2005-01-16 21:21 ` poirierg at gmail dot com
  2005-01-16 21:43 ` [Bug tree-optimization/19472] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: poirierg at gmail dot com @ 2005-01-16 21:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From poirierg at gmail dot com  2005-01-16 21:21 -------
(From update of attachment 7968)
This slitly modified version of posprocess.c features a patch by James A.
Morrison that allowed the compilation of that code (it was previously not
possible) but triggers an ICE


-- 


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


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

* [Bug tree-optimization/19472] [4.0 Regression] compiler internal error: in var_ann, at tree-flow-inline.h:34
  2005-01-16 21:11 [Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34 poirierg at gmail dot com
                   ` (2 preceding siblings ...)
  2005-01-16 21:21 ` poirierg at gmail dot com
@ 2005-01-16 21:43 ` pinskia at gcc dot gnu dot org
  2005-01-16 21:48 ` [Bug c/19472] " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-16 21:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-16 21:42 -------
Confirmed, here is one short testcase for one of the problems I found with the orginal testcase (I will be 
filing multiple bugs for all of the rest of the problems):

void postProcess_MMX2()
{
  int c, x,y, width;
  for(x=0; x<width; x+=8)
  {
   asm( "" :: "m" ((long)x));
   blockCopy_MMX2(&c);
  }
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c                           |tree-optimization
     Ever Confirmed|                            |1
  GCC build triplet|../src/configure -v --      |
                   |enable-                     |
                   |languages=c,c++,java,objc,ad|
                   |a --pre                     |
   GCC host triplet|GNU/Linux Debian SID i386,  |
                   |gcc 4.0.0 20050110          |
                   |(experimental)              |
 GCC target triplet|i386, athlon-xp             |
      Known to fail|4.0.0                       |
      Known to work|3.4.4 3.3.5 2.95.4          |
   Last reconfirmed|0000-00-00 00:00:00         |2005-01-16 21:42:59
               date|                            |
            Summary|compiler internal error: in |[4.0 Regression] compiler
                   |var_ann, at tree-flow-      |internal error: in var_ann,
                   |inline.h:34                 |at tree-flow-inline.h:34
   Target Milestone|---                         |4.0.0


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


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

* [Bug c/19472] [4.0 Regression] compiler internal error: in var_ann, at tree-flow-inline.h:34
  2005-01-16 21:11 [Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34 poirierg at gmail dot com
                   ` (3 preceding siblings ...)
  2005-01-16 21:43 ` [Bug tree-optimization/19472] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-01-16 21:48 ` pinskia at gcc dot gnu dot org
  2005-01-16 21:54 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-16 21:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-16 21:48 -------
I think I know what this problem is, it relates to the following inline-asm:
   asm( "" :: "m" ((long)x));

if you remove the cast (which is the correct thing to do, we no longer seg fault or cause an ICE).

The problem is we are not marking x as TREE_ADDRESSABLE.
I will look into fixing this.

Really this should be rejected but that is a different bug which cannot be fixed at this point because 
there are too many code which does this, even inside gcc (longlong.h).  And there is a already a bugzilla 
about this.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
          Component|tree-optimization           |c


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


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

* [Bug c/19472] [4.0 Regression] compiler internal error: in var_ann, at tree-flow-inline.h:34
  2005-01-16 21:11 [Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34 poirierg at gmail dot com
                   ` (4 preceding siblings ...)
  2005-01-16 21:48 ` [Bug c/19472] " pinskia at gcc dot gnu dot org
@ 2005-01-16 21:54 ` pinskia at gcc dot gnu dot org
  2005-01-16 22:57 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-16 21:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-16 21:54 -------
Oh, never mind, we should be able to reject this as it was deprecated in 3.4.0.  Working on a patch.

-- 


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


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

* [Bug c/19472] [4.0 Regression] compiler internal error: in var_ann, at tree-flow-inline.h:34
  2005-01-16 21:11 [Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34 poirierg at gmail dot com
                   ` (5 preceding siblings ...)
  2005-01-16 21:54 ` pinskia at gcc dot gnu dot org
@ 2005-01-16 22:57 ` pinskia at gcc dot gnu dot org
  2005-01-18  0:59 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-16 22:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-16 22:57 -------
(In reply to comment #5)
> Oh, never mind, we should be able to reject this as it was deprecated in 3.4.0.  Working on a patch.

Oh, wrong again, we did not deprecate this inline-asm in 3.4.0, hmm, we should have but did not.
I have a patch but note this really should be rejected and might in a future version of gcc.

Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-01/msg00949.html>

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug c/19472] [4.0 Regression] compiler internal error: in var_ann, at tree-flow-inline.h:34
  2005-01-16 21:11 [Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34 poirierg at gmail dot com
                   ` (6 preceding siblings ...)
  2005-01-16 22:57 ` pinskia at gcc dot gnu dot org
@ 2005-01-18  0:59 ` pinskia at gcc dot gnu dot org
  2005-01-18 17:52 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-18  0:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-18 00:59 -------
: Search converges between 2004-05-11-trunk (#454) and 2004-05-14-trunk (#455).

-- 


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


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

* [Bug c/19472] [4.0 Regression] compiler internal error: in var_ann, at tree-flow-inline.h:34
  2005-01-16 21:11 [Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34 poirierg at gmail dot com
                   ` (7 preceding siblings ...)
  2005-01-18  0:59 ` pinskia at gcc dot gnu dot org
@ 2005-01-18 17:52 ` cvs-commit at gcc dot gnu dot org
  2005-01-18 17:53 ` pinskia at gcc dot gnu dot org
  2005-01-20 22:00 ` poirierg at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-18 17:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-01-18 17:52 -------
Subject: Bug 19472

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pinskia@gcc.gnu.org	2005-01-18 17:52:33

Modified files:
	gcc            : ChangeLog c-typeck.c 
	gcc/testsuite  : ChangeLog 
	gcc/cp         : ChangeLog semantics.c 
Added files:
	gcc/testsuite/gcc.dg: asm-a.c 

Log message:
	2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR c/19472
	* semantics.c (finish_asm_stmt): Strip nops off
	input memory operands.
	
	2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR C/19472
	* c-typeck.c (build_asm_expr): Strip nops off
	input memory operands.
	
	2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR C/19472
	* gcc.dg/asm-a.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7177&r2=2.7178
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.409&r2=1.410
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4903&r2=1.4904
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4581&r2=1.4582
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.455&r2=1.456
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/asm-a.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c/19472] [4.0 Regression] compiler internal error: in var_ann, at tree-flow-inline.h:34
  2005-01-16 21:11 [Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34 poirierg at gmail dot com
                   ` (8 preceding siblings ...)
  2005-01-18 17:52 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-18 17:53 ` pinskia at gcc dot gnu dot org
  2005-01-20 22:00 ` poirierg at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-18 17:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-18 17:53 -------
Fixed.

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


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


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

* [Bug c/19472] [4.0 Regression] compiler internal error: in var_ann, at tree-flow-inline.h:34
  2005-01-16 21:11 [Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34 poirierg at gmail dot com
                   ` (9 preceding siblings ...)
  2005-01-18 17:53 ` pinskia at gcc dot gnu dot org
@ 2005-01-20 22:00 ` poirierg at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: poirierg at gmail dot com @ 2005-01-20 22:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From poirierg at gmail dot com  2005-01-20 22:00 -------
Hi,
I just tried with a fresh cvs checkout. It works! Thanks! (should I mark this
bug as VERIFIED ?)

Regards,
Guillaume

-- 


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


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

end of thread, other threads:[~2005-01-20 22:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-16 21:11 [Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34 poirierg at gmail dot com
2005-01-16 21:15 ` [Bug c/19472] " poirierg at gmail dot com
2005-01-16 21:19 ` poirierg at gmail dot com
2005-01-16 21:21 ` poirierg at gmail dot com
2005-01-16 21:43 ` [Bug tree-optimization/19472] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-01-16 21:48 ` [Bug c/19472] " pinskia at gcc dot gnu dot org
2005-01-16 21:54 ` pinskia at gcc dot gnu dot org
2005-01-16 22:57 ` pinskia at gcc dot gnu dot org
2005-01-18  0:59 ` pinskia at gcc dot gnu dot org
2005-01-18 17:52 ` cvs-commit at gcc dot gnu dot org
2005-01-18 17:53 ` pinskia at gcc dot gnu dot org
2005-01-20 22:00 ` poirierg at gmail 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).