www.digitalmars.com         C & C++   DMDScript  

D.gnu - GDC release 1d

reply David Friedman <d3rdclsmail earthlink.net> writes:
Here's another update.

http://home.earthlink.net/~dvdfrdmn/d/d-for-gcc-r1d.tgz

* ICE when a struct was used before its definition

* Segfault on empty scope statements

* ICE for associative array properties
* Segfault on typedef'd floating point constants
* Handle calls to super

* Fix assignment ops on bit arrays
* Fix layout of struct stat for darwin
Mar 25 2004
parent reply s31552 mail.ecc.u-tokyo.ac.jp writes:
Thank you for fixing the bugs! It really helps me. I can already build
some D applications. gdc is great.

But I found more bugs.

bug_foreach.d:

int main() {
    /* it's safe
    int[] os;
    os.length = 2;
    */
    int[2] os;
    foreach (inout int o; os) {
        o = 0;   // segmentation fault.
    }
    return 0;
}

bug_not.d:

void safe() {
    bit b = !1;
}
bit bug() {
    return !1;   // cannot compile
}

bug_for.d:

void bug() {
    for (int i=3; --i; ) {}   // cannot compile
}

And, I cannot compile phobos's gcc/config.d on MacOSX.

$ make
gdc -o gcc/config.o -g -O2 -I ../../gcc/d/phobos -I
../../gcc/d/phobos/internal/gc -c gcc/config.d
gcc/config.d:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make: *** [gcc/config.o] Error 1

I think gdc-1d may not work on MacOSX.

------------------
 shinichiro.h
  s31552 mail.ecc.u-tokyo.ac.jp
  http://user.ecc.u-tokyo.ac.jp/~s31552/wp/
Mar 25 2004
parent reply David Friedman <d3rdclsmail earthlink.net> writes:
I was not able to reproduce the crash for bug_not.d.  As for config.d, I
once accidently did a partial rebuild with the new gcc in the path and
ended up with a gdc that did not work.  That's my best guess.

The other bugs have been fixed in version 1e.  Please let me know if the
problems persist.

David

On Fri, 26 Mar 2004 04:09:02 +0900, s31552 wrote:

 Thank you for fixing the bugs! It really helps me. I can already build
 some D applications. gdc is great.
 
 But I found more bugs.
 
 bug_foreach.d:
 
 int main() {
     /* it's safe
     int[] os;
     os.length = 2;
     */
     int[2] os;
     foreach (inout int o; os) {
         o = 0;   // segmentation fault.
     }
     return 0;
 }
 
 bug_not.d:
 
 void safe() {
     bit b = !1;
 }
 bit bug() {
     return !1;   // cannot compile
 }
 
 bug_for.d:
 
 void bug() {
     for (int i=3; --i; ) {}   // cannot compile
 }
 
 And, I cannot compile phobos's gcc/config.d on MacOSX.
 
 $ make
 gdc -o gcc/config.o -g -O2 -I ../../gcc/d/phobos -I
../../gcc/d/phobos/internal/gc -c gcc/config.d
 gcc/config.d:0: internal compiler error: Segmentation fault
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See <URL:http://gcc.gnu.org/bugs.html> for instructions.
 make: *** [gcc/config.o] Error 1
 
 I think gdc-1d may not work on MacOSX.
 
 ------------------
  shinichiro.h
   s31552 mail.ecc.u-tokyo.ac.jp
   http://user.ecc.u-tokyo.ac.jp/~s31552/wp/
Mar 28 2004
parent s31552 mail.ecc.u-tokyo.ac.jp writes:
 I was not able to reproduce the crash for bug_not.d.
Hmm... I cannot reproduce the crash too on MacOSX. It may be only linux's problem. I try to report a gdb trace. The crash happens with linux-2.4.22 (Fedora Core1) and gcc-3.3.2 and gdc-r1e.
 gdb /usr/local/stow/gcc-gdc-3.3.2/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/cc1d
(gdb) break expr.c:3165 Breakpoint 1 at 0x810ea76: file ../../gcc/expr.c, line 3165. (gdb) run bug_not.d -dumpbase bug_not.d -auxbase bug_not -version -o /tmp/cc0o8f RV.s Starting program: /usr/local/stow/gcc-gdc-3.3.2/lib/gcc-lib/i686-pc-linux-gnu/3. 3.2/cc1d bug_not.d -dumpbase bug_not.d -auxbase bug_not -version -o /tmp/cc0o8fR V.s GNU D version 3.3.2 (i686-pc-linux-gnu) compiled by GNU C version 3.3.2. GGC heuristics: --param ggc-min-expand=38 --param ggc-min-heapsize=15833 options passed: -auxbase options enabled: -fpeephole -ffunction-cse -fkeep-static-consts -fpcc-struct-return -fgcse-lm -fgcse-sm -fsched-interblock -fsched-spec -fbranch-count-reg -fexceptions -fcommon -fgnu-linker -fargument-alias -fzero-initialized-in-bss -fident -fmath-errno -ftrapping-math -fbounds-check -m80387 -mhard-float -mno-soft-float -mieee-fp -mfp-ret-in-387 -maccumulate-outgoing-args -mcpu=pentiumpro -march=i386 safe bug Breakpoint 1, emit_move_insn (x=0xbf5b26c0, y=0xbf5b2714) at ../../gcc/expr.c:3165 3165 abort (); (gdb) where irs=0x958f1d0) at ../../gcc/d/d-glue.cc:2672 irs=0x958f1d0) at ../../gcc/d/d-glue.cc:3040 irs=0x958f1d0) at ../../gcc/d/d-glue.cc:3040 at ../../gcc/d/d-glue.cc:2040 at ../../gcc/d/d-glue.cc:2107 at ../../gcc/toplev.c:5432
 As for config.d, I
 once accidently did a partial rebuild with the new gcc in the path and
 ended up with a gdc that did not work.  That's my best guess.
I'm sorry. It's my mistake. I built gdc with the gcc installed with earlier gdc. It seems I should build it with MacOSX's gcc.
Apr 09 2004