public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/22134] New: vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419
@ 2005-06-21  6:57 webmaster at toshsoft dot de
  2005-06-21 12:55 ` [Bug target/22134] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: webmaster at toshsoft dot de @ 2005-06-21  6:57 UTC (permalink / raw)
  To: gcc-bugs

tryed to build mplayer

cc -c -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -O4 -march=pentium3
-mtune=pentium3 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE  -I. -Inative
-I.. -I../libmpdemux -I../loader   -D_GNU_SOURCE -o vf_hue.o vf_hue.c
vf_hue.c: In function 'process_C':
vf_hue.c:54: error: could not split insn
(insn:TI 31 217 218 (parallel [
            (set (mem:SI (reg/f:SI 7 sp) [21 S4 A8])
                (unspec:SI [
                        (reg:XF 8 st)
                    ] 66))
            (clobber (mem:SI (plus:SI (reg/f:SI 7 sp)
                        (const_int 12 [0xc])) [0 S4 A8]))
        ]) 469 {fistsi2_with_temp} (insn_list:REG_DEP_TRUE 30
(insn_list:REG_DEP_TRUE 193 (nil)))
    (expr_list:REG_DEAD (reg:XF 8 st)
        (nil)))
vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419
Please submit a full bug report,
with preprocessed source if appropriate.
make[1]: *** [vf_hue.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/mplayer-1.0_pre7/work/MPlayer-1.0pre7/libmpcodecs'
make: *** [libmpcodecs/libmpcodecs.a] Error 2

-- 
           Summary: vf_hue.c:54: internal compiler error: in
                    final_scan_insn, at final.c:2419
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: webmaster at toshsoft dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: 4.1.0
  GCC host triplet: 4.1.0
GCC target triplet: 4.1.0


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


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

* [Bug target/22134] vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419
  2005-06-21  6:57 [Bug c/22134] New: vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419 webmaster at toshsoft dot de
@ 2005-06-21 12:55 ` pinskia at gcc dot gnu dot org
  2005-06-21 14:59 ` webmaster at toshsoft dot de
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-21 12:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-21 12:55 -------
Can you attach the preprocessing source as requested by the web site: <http://gcc.gnu.org/
bugs.html> and also the output of "cc -v"?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |WAITING
          Component|c                           |target
  GCC build triplet|4.1.0                       |
   GCC host triplet|4.1.0                       |
 GCC target triplet|4.1.0                       |
           Keywords|                            |ice-on-valid-code


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


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

* [Bug target/22134] vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419
  2005-06-21  6:57 [Bug c/22134] New: vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419 webmaster at toshsoft dot de
  2005-06-21 12:55 ` [Bug target/22134] " pinskia at gcc dot gnu dot org
@ 2005-06-21 14:59 ` webmaster at toshsoft dot de
  2005-06-21 15:02 ` webmaster at toshsoft dot de
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: webmaster at toshsoft dot de @ 2005-06-21 14:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From webmaster at toshsoft dot de  2005-06-21 14:59 -------
cc -v output:

Using built-in specs.
Target: i686-pc-linux-gnu
Configured with:
/var/tmp/portage/gcc-4.1.0_beta20050604/work/gcc-4.1-20050604/configure
--enable-version-specific-runtime-libs --prefix=/usr
--bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.0-beta20050604
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.0-beta20050604/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20050604
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20050604/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20050604/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.0-beta20050604/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libgcj --enable-languages=c,c++ --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.0 20050604 (experimental)


-- 


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


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

* [Bug target/22134] vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419
  2005-06-21  6:57 [Bug c/22134] New: vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419 webmaster at toshsoft dot de
  2005-06-21 12:55 ` [Bug target/22134] " pinskia at gcc dot gnu dot org
  2005-06-21 14:59 ` webmaster at toshsoft dot de
@ 2005-06-21 15:02 ` webmaster at toshsoft dot de
  2005-06-21 15:06 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: webmaster at toshsoft dot de @ 2005-06-21 15:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From webmaster at toshsoft dot de  2005-06-21 15:02 -------
Source of vf_hue.c :

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <math.h>

#include "../config.h"
#include "../mp_msg.h"
#include "../cpudetect.h"

#include "img_format.h"
#include "mp_image.h"
#include "vf.h"

#include "../libvo/video_out.h"

#include "m_option.h"
#include "m_struct.h"

static struct vf_priv_s {
	uint8_t *buf[2];
	float hue;
	float saturation;
} vf_priv_dflt = {
  {NULL, NULL},
  0.0,
  1.0,
};

static void process_C(uint8_t *udst, uint8_t *vdst, uint8_t *usrc, uint8_t
*vsrc, int dststride, int srcstride,
		    int w, int h, float hue, float sat)
{
	int i;
	const int s= rint(sin(hue) * (1<<16) * sat);
	const int c= rint(cos(hue) * (1<<16) * sat);

	while (h--) {
		for (i = 0; i<w; i++)
		{
			const int u= usrc[i] - 128;
			const int v= vsrc[i] - 128;
			int new_u= (c*u - s*v + (1<<15) + (128<<16))>>16;
			int new_v= (s*u + c*v + (1<<15) + (128<<16))>>16;
			if(new_u & 768) new_u= (-new_u)>>31;
			if(new_v & 768) new_v= (-new_v)>>31;
			udst[i]= new_u;
			vdst[i]= new_v;
		}
		usrc += srcstride;
		vsrc += srcstride;
		udst += dststride;
		vdst += dststride;
	}
}

static void (*process)(uint8_t *udst, uint8_t *vdst, uint8_t *usrc, uint8_t
*vsrc, int dststride, int srcstride,
		    int w, int h, float hue, float sat);

/* FIXME: add packed yuv version of process */

static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
{
	mp_image_t *dmpi;

	dmpi=vf_get_image(vf->next, mpi->imgfmt,
			  MP_IMGTYPE_EXPORT, 0,
			  mpi->w, mpi->h);
	
	dmpi->planes[0] = mpi->planes[0];
	dmpi->stride[0] = mpi->stride[0];
	dmpi->stride[1] = mpi->stride[1];
	dmpi->stride[2] = mpi->stride[2];

	if (!vf->priv->buf[0]){
		vf->priv->buf[0] = malloc(mpi->stride[1]*mpi->h >> mpi->chroma_y_shift);
		vf->priv->buf[1] = malloc(mpi->stride[2]*mpi->h >> mpi->chroma_y_shift);
	}
	
	if (vf->priv->hue == 0 && vf->priv->saturation == 1){
		dmpi->planes[1] = mpi->planes[1];
		dmpi->planes[2] = mpi->planes[2];
	}else {
		dmpi->planes[1] = vf->priv->buf[0];
		dmpi->planes[2] = vf->priv->buf[1];
		process(dmpi->planes[1], dmpi->planes[2],
			mpi->planes[1], mpi->planes[2],
			dmpi->stride[1],mpi->stride[1],
			mpi->w>> mpi->chroma_x_shift, mpi->h>> mpi->chroma_y_shift, 
			vf->priv->hue, vf->priv->saturation);
	}

	return vf_next_put_image(vf,dmpi);
}

static int control(struct vf_instance_s* vf, int request, void* data)
{
	vf_equalizer_t *eq;

	switch (request) {
	case VFCTRL_SET_EQUALIZER:
		eq = data;
		if (!strcmp(eq->item,"hue")) {
			vf->priv->hue = eq->value * M_PI / 100;
			return CONTROL_TRUE;
		} else if (!strcmp(eq->item,"saturation")) {
			vf->priv->saturation = eq->value/100.0 + 100;
			return CONTROL_TRUE;
		}
		break;
	case VFCTRL_GET_EQUALIZER:
		eq = data;
		if (!strcmp(eq->item,"hue")) {
			eq->value = rint(vf->priv->hue *100 / M_PI);
			return CONTROL_TRUE;
		}else if (!strcmp(eq->item,"saturation")) {
			eq->value = rint(vf->priv->saturation*100 - 100);
			return CONTROL_TRUE;
		}
		break;
	}
	return vf_next_control(vf, request, data);
}

static int query_format(struct vf_instance_s* vf, unsigned int fmt)
{
	switch (fmt) {
	case IMGFMT_YVU9:
	case IMGFMT_IF09:
	case IMGFMT_YV12:
	case IMGFMT_I420:
	case IMGFMT_IYUV:
	case IMGFMT_CLPL:
	case IMGFMT_444P:
	case IMGFMT_422P:
	case IMGFMT_411P:
		return vf_next_query_format(vf, fmt);
	}
	return 0;
}

static void uninit(struct vf_instance_s* vf)
{
	if (vf->priv->buf[0]) free(vf->priv->buf[0]);
	if (vf->priv->buf[1]) free(vf->priv->buf[1]);
	free(vf->priv);
}

static int open(vf_instance_t *vf, char* args)
{
	vf->control=control;
	vf->query_format=query_format;
	vf->put_image=put_image;
	vf->uninit=uninit;
	
	if(!vf->priv) {
	vf->priv = malloc(sizeof(struct vf_priv_s));
	memset(vf->priv, 0, sizeof(struct vf_priv_s));
	}
	if (args) sscanf(args, "%f:%f", &vf->priv->hue, &vf->priv->saturation);
        vf->priv->hue *= M_PI / 180.0;

	process = process_C;
#ifdef HAVE_MMXX
	if(gCpuCaps.hasMMX) process = process_MMX;
#endif
	
	return 1;
}

#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
static m_option_t vf_opts_fields[] = {
  {"hue", ST_OFF(hue), CONF_TYPE_FLOAT, M_OPT_RANGE,-180.0 ,180.0, NULL},
  {"saturation", ST_OFF(saturation), CONF_TYPE_FLOAT, M_OPT_RANGE,-10.0 ,10.0,
NULL},
  { NULL, NULL, 0, 0, 0, 0,  NULL }
};

static m_struct_t vf_opts = {
  "hue",
  sizeof(struct vf_priv_s),
  &vf_priv_dflt,
  vf_opts_fields
};

vf_info_t vf_info_hue = {
	"hue changer",
	"hue",
	"Michael Niedermayer",
	"",
	open,
	&vf_opts
};



-- 


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


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

* [Bug target/22134] vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419
  2005-06-21  6:57 [Bug c/22134] New: vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419 webmaster at toshsoft dot de
                   ` (2 preceding siblings ...)
  2005-06-21 15:02 ` webmaster at toshsoft dot de
@ 2005-06-21 15:06 ` pinskia at gcc dot gnu dot org
  2005-06-22  3:54 ` [Bug target/22134] [4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-21 15:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-21 15:06 -------
(In reply to comment #3)
> Source of vf_hue.c :
We don't want that source, add -save-temps and attach the .i file instead.  And attach it, don't inline it 
because it is easy to get at that way.

-- 


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


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

* [Bug target/22134] [4.1 Regression] vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419
  2005-06-21  6:57 [Bug c/22134] New: vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419 webmaster at toshsoft dot de
                   ` (3 preceding siblings ...)
  2005-06-21 15:06 ` pinskia at gcc dot gnu dot org
@ 2005-06-22  3:54 ` pinskia at gcc dot gnu dot org
  2005-06-22  6:08 ` uros at kss-loka dot si
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-22  3:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-22 03:53 -------
Confirmed, reduced testcase:
double rint (double __x) __attribute__ ((__nothrow__));
void process_C(unsigned char *udst, unsigned char *usrc,
               int w, float hue)
{
 int i;
 int c = rint(hue);
  for (i = 0; i<w; i++)
  {
   int u = usrc[i];
   int new_u = c*u;
   if(new_u & 1) new_u= (-new_u)>>31;
   udst[i]= new_u;
  }
}

rint is importrant.

-O1 -ffast-math is enough to reproduce this.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |uros at kss-loka dot si
             Status|WAITING                     |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-06-22 03:53:54
               date|                            |
            Summary|vf_hue.c:54: internal       |[4.1 Regression]
                   |compiler error: in          |vf_hue.c:54: internal
                   |final_scan_insn, at         |compiler error: in
                   |final.c:2419                |final_scan_insn, at
                   |                            |final.c:2419
   Target Milestone|---                         |4.1.0


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


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

* [Bug target/22134] [4.1 Regression] vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419
  2005-06-21  6:57 [Bug c/22134] New: vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419 webmaster at toshsoft dot de
                   ` (4 preceding siblings ...)
  2005-06-22  3:54 ` [Bug target/22134] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-06-22  6:08 ` uros at kss-loka dot si
  2005-06-28 19:19 ` cvs-commit at gcc dot gnu dot org
  2005-06-28 19:29 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: uros at kss-loka dot si @ 2005-06-22  6:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From uros at kss-loka dot si  2005-06-22 06:08 -------
Uh, it was a cut-n-pasto...

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2005-
                   |                            |06/msg01759.html
           Keywords|                            |patch


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


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

* [Bug target/22134] [4.1 Regression] vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419
  2005-06-21  6:57 [Bug c/22134] New: vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419 webmaster at toshsoft dot de
                   ` (5 preceding siblings ...)
  2005-06-22  6:08 ` uros at kss-loka dot si
@ 2005-06-28 19:19 ` cvs-commit at gcc dot gnu dot org
  2005-06-28 19:29 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-28 19:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-06-28 19:19 -------
Subject: Bug 22134

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2005-06-28 19:19:29

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: i386.md 

Log message:
	PR target/22134
	* config/i386/i386.md (fist<mode>2_with_temp splitter):
	Clobber memory operand, not scratch register.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9257&r2=2.9258
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.639&r2=1.640



-- 


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


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

* [Bug target/22134] [4.1 Regression] vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419
  2005-06-21  6:57 [Bug c/22134] New: vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419 webmaster at toshsoft dot de
                   ` (6 preceding siblings ...)
  2005-06-28 19:19 ` cvs-commit at gcc dot gnu dot org
@ 2005-06-28 19:29 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-28 19:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-28 19:29 -------
Fixed.

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


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


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

end of thread, other threads:[~2005-06-28 19:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-21  6:57 [Bug c/22134] New: vf_hue.c:54: internal compiler error: in final_scan_insn, at final.c:2419 webmaster at toshsoft dot de
2005-06-21 12:55 ` [Bug target/22134] " pinskia at gcc dot gnu dot org
2005-06-21 14:59 ` webmaster at toshsoft dot de
2005-06-21 15:02 ` webmaster at toshsoft dot de
2005-06-21 15:06 ` pinskia at gcc dot gnu dot org
2005-06-22  3:54 ` [Bug target/22134] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-06-22  6:08 ` uros at kss-loka dot si
2005-06-28 19:19 ` cvs-commit at gcc dot gnu dot org
2005-06-28 19:29 ` 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).