How to get signedness from rtx?

2008-07-05 Thread Mohamed Shafi
Hello all,

Is there a way to know whether an operand is signed or unsigned from its rtx?

Regards,
Shafi


Re: How to get signedness from rtx?

2008-07-05 Thread Eric Botcazou
> Is there a way to know whether an operand is signed or unsigned from its
> rtx?

Basically no, this information is not encoded in the operand, rather in the 
operator (if it matters).

-- 
Eric Botcazou


Re: How to get signedness from rtx?

2008-07-05 Thread Mohamed Shafi
2008/7/5 Eric Botcazou <[EMAIL PROTECTED]>:
>> Is there a way to know whether an operand is signed or unsigned from its
>> rtx?
>
> Basically no, this information is not encoded in the operand, rather in the
> operator (if it matters).
>
> --
   Ok, my problem is that for some processing during comparison i need
to know whether is the char operand is signed or unsigned. So i guess
i can get this looking at what type of comparison is. But if the
comparison code is EQ or NE will i be able to get the information?

Shafi


Re: How to get signedness from rtx?

2008-07-05 Thread Eric Botcazou
>Ok, my problem is that for some processing during comparison i need
> to know whether is the char operand is signed or unsigned. So i guess
> i can get this looking at what type of comparison is. But if the
> comparison code is EQ or NE will i be able to get the information?

If the signedness doesn't matter for the operation, it won't generally be 
encoded in the operator.  But, in this case, further processing of the 
operation shouldn't have to care about signedness, since at some point it 
didn't matter.  On the other hand, if you're talking about the initial 
processing (i.e. during RTL expansion), the information is encoded in the 
trees fed to the expander.

-- 
Eric Botcazou


Re: (new) Failure building GFortran (Cygwin)

2008-07-05 Thread Angelo Graziosi

For the sake of completeness I want to flag that the current snapshot
4.4-20080704 has new failures:

/work/build/./prev-gcc/xgcc -B/work/build/./prev-gcc/
-B/usr/local/gfortran/i686-pc-cygwin/bin/ -c  -g -O2 -DIN_GCC   -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual
-Wc++-compat -Wold-style-definition -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Werror   -DHAVE_CONFIG_H -I. -I.
-I/work/gcc/gcc -I/work/gcc/gcc/. -I/work/gcc/gcc/../include
-I/work/gcc/gcc/../libcpp/include  -I/work/gcc/gcc/../libdecnumber
-I/work/gcc/gcc/../libdecnumber/bid -I../libdecnumber
/work/gcc/gcc/ggc-page.c -o ggc-page.o
cc1: warnings being treated as errors
/work/gcc/gcc/ggc-page.c: In function 'alloc_page':
/work/gcc/gcc/ggc-page.c:802: error: request for implicit conversion
from 'void *' to 'char *' not permitted in C++
/work/gcc/gcc/ggc-page.c:845: error: request for implicit conversion
from 'void *' to 'struct page_entry *' not permitted in C++
make[3]: *** [ggc-page.o] Error 1
make[3]: *** Waiting for unfinished jobs
rm cpp.pod gfdl.pod gfortran.pod fsf-funding.pod gcc.pod gcov.pod
make[3]: Leaving directory `/work/build/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/work/build'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/work/build'
make: *** [all] Error 2

It seems that this patch solves the problem

--- ggc-page.c.orig 2008-06-29 06:39:16.0 +0200
+++ ggc-page.c  2008-07-05 12:00:20.90625 +0200
@@ -799,7 +799,7 @@
alloc_size = GGC_QUIRE_SIZE * G.pagesize;
   else
alloc_size = entry_size + G.pagesize - 1;
-  allocation = xmalloc (alloc_size);
+  allocation = (char *)xmalloc (alloc_size);

   page = (char *) (((size_t) allocation + G.pagesize - 1) &
-G.pagesize);
   head_slop = page - allocation;
@@ -842,7 +842,7 @@
  struct page_entry *e, *f = G.free_pages;
  for (a = enda - G.pagesize; a != page; a -= G.pagesize)
{
- e = xcalloc (1, page_entry_size);
+  e = (struct page_entry *)xcalloc (1, page_entry_size);
  e->order = order;
  e->bytes = G.pagesize;
  e->page = a;


But I am confused in any case: Why 'not permitted in C++'?
Isn't xgcc a C compiler?

I am enabling only C,Fortran!


Cheers,
   Angelo.


Paul Richard Thomas ha scritto:

Angelo,

I have seen this too - I thought that it was due to the VERY strange
way in which I was doing the build:-)

Andd 'const' to strsignal.c:408 and the build will go through.

Paul

On Sat, Jun 28, 2008 at 2:09 PM, Angelo Graziosi
<[EMAIL PROTECTED]> wrote:

Last week I flagged some problems with 4.4-20080620 snapshot [1], now the
current snapshot fails in a different manner:

[...]
make[2]: Entering directory `/work/build'
make[3]: Entering directory `/work/build'
rm -f stage_current
make[3]: Leaving directory `/work/build'
Comparing stages 2 and 3
warning: ./cc1-checksum.o differs
Comparison successful.
if false; then \
 rm -rf stage2-*; \
 echo timestamp >  stage2-lean; \
   fi
[...]
make[4]: Leaving directory `/work/build/i686-pc-cygwin/libgfortran'
make[3]: Leaving directory `/work/build/i686-pc-cygwin/libgfortran'
make[2]: Leaving directory `/work/build/i686-pc-cygwin/libgfortran'
Checking multilib configuration for libiberty...
mkdir -p -- i686-pc-cygwin/libiberty
Configuring in i686-pc-cygwin/libiberty
[...]
/work/build/./gcc/xgcc -B/work/build/./gcc/
-B/usr/local/gfortran/i686-pc-cygwin/bin/
-B/usr/local/gfortran/i686-pc-cygwin/lib/ -isystem
/usr/local/gfortran/i686-pc-cygwin/include -isystem
/usr/local/gfortran/i686-pc-cygwin/sys-include -c -DHAVE_CONFIG_H -g -O2
 -I. -I/work/gcc/libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat
-Wstrict-prototypes -pedantic /work/gcc/libiberty/strerror.c -o strerror.o
if [ x"" != x ]; then \
 /work/build/./gcc/xgcc -B/work/build/./gcc/
-B/usr/local/gfortran/i686-pc-cygwin/bin/
-B/usr/local/gfortran/i686-pc-cygwin/lib/ -isystem
/usr/local/gfortran/i686-pc-cygwin/include -isystem
/usr/local/gfortran/i686-pc-cygwin/sys-include -c -DHAVE_CONFIG_H -g -O2
 -I. -I/work/gcc/libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat
-Wstrict-prototypes -pedantic /work/gcc/libiberty/strsignal.c -o
pic/strsignal.o; \
   else true; fi
/work/build/./gcc/xgcc -B/work/build/./gcc/
-B/usr/local/gfortran/i686-pc-cygwin/bin/
-B/usr/local/gfortran/i686-pc-cygwin/lib/ -isystem
/usr/local/gfortran/i686-pc-cygwin/include -isystem
/usr/local/gfortran/i686-pc-cygwin/sys-include -c -DHAVE_CONFIG_H -g -O2
 -I. -I/work/gcc/libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat
-Wstrict-prototypes -pedantic /work/gcc/libiberty/strsignal.c -o strsignal.o
/work/gcc/libiberty/strsignal.c:408: error: conflicting types for
'strsignal'
/usr/include/string.h:78: error: previous declaration of 'strsignal' was
here
make[2]: *** [strsignal.o] Error 1
make[2]: Leav