Bug 11687 - [3.3 only] xstormy16-elf build fails in libf2c
Summary: [3.3 only] xstormy16-elf build fails in libf2c
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.3.1
: P2 normal
Target Milestone: 3.3.2
Assignee: Not yet assigned to anyone
URL:
Keywords: build, ice-on-valid-code
: 11688 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-07-27 18:46 UTC by Dara Hazeghi
Modified: 2003-07-27 20:05 UTC (History)
1 user (show)

See Also:
Host:
Target: xstormy16-elf
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-07-27 19:37:01


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dara Hazeghi 2003-07-27 18:46:45 UTC
/tmp/branch/objdir/gcc/xgcc -B/tmp/branch/objdir/gcc/ -nostdinc -B/tmp/branch/objdir/
xstormy16-elf/newlib/ -isystem /tmp/branch/objdir/xstormy16-elf/newlib/targ-include -
isystem /tmp/branch/combined/newlib/libc/include -B/usr/local/xstormy16-elf/bin/ -B/usr/
local/xstormy16-elf/lib/ -isystem /usr/local/xstormy16-elf/include -L/tmp/branch/objdir/ld -c 
-DSkip_f2c_Undefs -DAllow_TYQUAD -I. -I../../../../combined/libf2c/libI77 -I.. -I../../../../
combined/libf2c/libI77/.. -DHAVE_CONFIG_H -W -Wall -O2 -g -O2 ../../../../combined/libf2c/
libI77/iio.c -o iio.o
../../../../combined/libf2c/libI77/iio.c: In function `c_si':
../../../../combined/libf2c/libI77/iio.c:67: error: insn does not satisfy its constraints:
(insn 185 125 126 7 (nil) (set (reg:SI 7 r7 [78])
        (mem/s:SI (plus:HI (reg/v/f:HI 10 r10 [25])
                (const_int 16 [0x10])) [5 <variable>.icirnum+0 S4 A16])) 6 {*movsi_internal} (nil)
    (nil))
../../../../combined/libf2c/libI77/iio.c:67: internal compiler error: in 
reload_cse_simplify_operands, at reload1.c:8345
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[2]: *** [iio.lo] Error 1
make[2]: Leaving directory `/tmp/branch/objdir/xstormy16-elf/libf2c/libI77'
make[1]: *** [i77] Error 2
make[1]: Leaving directory `/tmp/branch/objdir/xstormy16-elf/libf2c'
make: *** [all-target-libf2c] Error 2

Here's the reduced failing testcase:

typedef __g77_integer flag;
typedef __g77_integer ftnint;

typedef struct
{ flag icierr;
        char *iciunit;
        ftnint icirlen;
        ftnint icirnum;
} icilist;

extern char *f__icptr;
char *f__icend;

void
c_si (icilist * a)
{
  f__icend = f__icptr + a->icirlen * a->icirnum;
Comment 1 Dara Hazeghi 2003-07-27 18:47:35 UTC
Oops the testcase didn't quite copy over...

typedef __g77_integer flag;
typedef __g77_integer ftnint;

typedef struct
{ flag icierr;
        char *iciunit;
        ftnint icirlen;
        ftnint icirnum;
} icilist;

extern char *f__icptr;
char *f__icend;

void
c_si (icilist * a)
{
  f__icend = f__icptr + a->icirlen * a->icirnum;
}
Comment 2 Dara Hazeghi 2003-07-27 18:48:43 UTC
Should be in target...
Comment 3 Dara Hazeghi 2003-07-27 18:49:17 UTC
*** Bug 11688 has been marked as a duplicate of this bug. ***
Comment 4 Andrew Pinski 2003-07-27 19:19:06 UTC
I could not reproduce this on the mainline (20030727), most likely only 3.3 problem.
Comment 5 Andrew Pinski 2003-07-27 19:37:01 UTC
I can confirm this on 3.3.1 (20030714).
Comment 6 Andrew Pinski 2003-07-27 19:48:52 UTC
It also happens in 3.2.3.
Comment 7 Andrew Pinski 2003-07-27 20:00:07 UTC
It also happens in 3.1 .
Comment 8 Andrew Pinski 2003-07-27 20:05:47 UTC
Since this has been happening since stormy16 (or xstormy16 was added) and is already 
fixed on the mainline:
2001-08-22  Geoffrey Keating

        * config.gcc: Add stormy16-*-elf case.
        * config/stormy16/stormy-abi: New file.
        * config/stormy16/stormy16-lib2.c: New file.
        * config/stormy16/stormy16-protos.h: New file.
        * config/stormy16/stormy16.c: New file.
        * config/stormy16/stormy16.h: New file.
        * config/stormy16/stormy16.md: New file.
        * config/stormy16/t-stormy16: New file.

Closing as fixed.
Comment 9 GCC Commits 2003-09-07 04:10:15 UTC
Subject: Bug 11687

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2003-09-07 04:10:10

Modified files:
	gcc/cp         : ChangeLog call.c typeck.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/expr: static_cast5.C 

Log message:
	PR c++/11687
	* call.c (standard_conversion): Improve comments.
	(perform_direct_initialization): Make sure we return an expression
	of the correct type.
	* typeck.c (build_static_cast): Check for ambiguity and
	accessibility when performing conversions.
	
	PR c++/11687
	* g++.dg/expr/static_cast5.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3654&r2=1.3655
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.431&r2=1.432
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.500&r2=1.501
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3031&r2=1.3032
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/static_cast5.C.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 10 GCC Commits 2003-09-07 04:15:02 UTC
Subject: Bug 11687

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	mmitchel@gcc.gnu.org	2003-09-07 04:14:57

Modified files:
	gcc/cp         : ChangeLog call.c typeck.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/expr: static_cast5.C 

Log message:
	PR c++/11687
	* call.c (standard_conversion): Improve comments.
	(perform_direct_initialization): Make sure we return an expression
	of the correct type.
	* typeck.c (build_static_cast): Check for ambiguity and
	accessibility when performing conversions.
	
	PR c++/11687
	* g++.dg/expr/static_cast5.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.199&r2=1.3076.2.200
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.341.2.31&r2=1.341.2.32
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.436.2.13&r2=1.436.2.14
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.267&r2=1.2261.2.268
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/static_cast5.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1