This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
compilation error
- From: Rony Paul <ronypaul77 at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 8 Jun 2011 13:09:28 +0200
- Subject: compilation error
Dear All,
could you please tell me what type of error is the following code returning?
make[5]: Entering directory `/home/kosarker/Work/build-gcc/gcc'
/home/kosarker/Work/build-gcc/./gcc/xgcc
-B/home/kosarker/Work/build-gcc/./gcc/ -B/usr/local/spu/bin/
-B/usr/local/spu/lib/ -isystem /usr/local/spu/include -isystem
/usr/local/spu/sys-include -O2 -g -O2 -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -I.
-I/home/kosarker/Work/build-gcc/spu/mea64/libgcc -I../../gcc-4.5.0/gcc
-I../../gcc-4.5.0/gcc//home/kosarker/Work/build-gcc/spu/mea64/libgcc
-I../../gcc-4.5.0/gcc/../include
-I../../gcc-4.5.0/gcc/../libcpp/include
-I../../gcc-4.5.0/gcc/../libdecnumber
-I../../gcc-4.5.0/gcc/../libdecnumber/dpd -I../libdecnumber -g -O2
-mea64 -g0 -finhibit-size-directive -fno-inline -fno-exceptions
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize
-Dinhibit_libc \
-c ../../gcc-4.5.0/gcc/crtstuff.c -DCRT_BEGIN \
-o /home/kosarker/Work/build-gcc/spu/mea64/libgcc/crtbegin.o
../../gcc-4.5.0/gcc/crtstuff.c:249:1: internal compiler error:
Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[5]: *** [/home/kosarker/Work/build-gcc/spu/mea64/libgcc/crtbegin.o] Error 1
make[5]: Leaving directory `/home/kosarker/Work/build-gcc/gcc'
make[4]: *** [gcc-extra-parts] Error 2
make[4]: Leaving directory `/home/kosarker/Work/build-gcc/spu/mea64/libgcc'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/home/kosarker/Work/build-gcc/spu/libgcc'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/home/kosarker/Work/build-gcc/spu/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/home/kosarker/Work/build-gcc'
make: *** [all] Error 2
----------------------------------------------------------------------------------------------------------------------------------------------
what I did that in the file c-typeck.c I have added some code, like following :
previously it was :
else if (codel == POINTER_TYPE && coder == INTEGER_TYPE)
{
/* An explicit constant 0 can convert to a pointer,
or one that results from arithmetic, even including
a cast to integer type. */
WARN_FOR_ASSIGNMENT (location, 0,
G_("passing argument %d of %qE makes "
"pointer from integer without a cast"),
G_("assignment makes pointer from integer "
"without a cast//// konica diff address space"),
G_("initialization makes pointer from "
"integer without a cast"),
G_("return makes pointer from integer "
"without a cast"));
}
I have replaced it with :
else if (codel == POINTER_TYPE && coder == INTEGER_TYPE)
{
/* An explicit constant 0 can convert to a pointer,
or one that results from arithmetic, even including
a cast to integer type. */
tree ttl = TREE_TYPE (type);
tree ttr = TREE_TYPE (rhstype);
tree mvl = ttl;
tree mvr = ttr;
bool is_opaque_pointer;
int target_cmp = 0; /* Cache comp_target_types () result. */
addr_space_t asl;
addr_space_t asr;
asl = TYPE_ADDR_SPACE (ttl);
asr = TYPE_ADDR_SPACE (ttr);
if (asr != asl )
{
WARN_FOR_ASSIGNMENT (location, 0,
G_("passing argument %d of %qE makes "
"pointer from integer without a cast"),
G_("assignment makes pointer from integer "
"without a cast"),
G_("initialization makes pointer from "
"integer without a cast"),
G_("return makes pointer from integer "
"without a cast"));
}