digitalmars.D.bugs - char buffer resize appears broken on linux 1.162
- William S. Lear (19/19) Jul 05 2006 % cat t.d
- Walter Bright (3/6) Jul 06 2006 _d_arraysetlength2 should be defined in the new libphobos.a. Make sure
- William S. Lear (4/10) Jul 07 2006 Ah, I had forgotten about libphobos.a in /usr/lib. Indeed, this was the...
- Thomas Kuehne (11/29) Jul 06 2006 -----BEGIN PGP SIGNED MESSAGE-----
% cat t.d
void main() {
char[] buffer;
buffer.length = 0;
}
% dmd -v t.d
parse t
semantic t
semantic2 t
semantic3 t
code t
generating code for function 'main'
gcc t.o -o t -m32 -lphobos -lpthread -lm
t.o(.gnu.linkonce.t_Dmain+0x1f): In function `_Dmain':
: undefined reference to `_d_arraysetlength2'
collect2: ld returned 1 exit status
--- errorlevel 1
If I change char[] to int[], it works.
Bill
Jul 05 2006
William S. Lear wrote:gcc t.o -o t -m32 -lphobos -lpthread -lm t.o(.gnu.linkonce.t_Dmain+0x1f): In function `_Dmain': : undefined reference to `_d_arraysetlength2'_d_arraysetlength2 should be defined in the new libphobos.a. Make sure the new one is installed over the old one.
Jul 06 2006
In article <e8kopo$1f9d$1 digitaldaemon.com>, Walter Bright says...William S. Lear wrote:Ah, I had forgotten about libphobos.a in /usr/lib. Indeed, this was the cause. Thank you. Billgcc t.o -o t -m32 -lphobos -lpthread -lm t.o(.gnu.linkonce.t_Dmain+0x1f): In function `_Dmain': : undefined reference to `_d_arraysetlength2'_d_arraysetlength2 should be defined in the new libphobos.a. Make sure the new one is installed over the old one.
Jul 07 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
William S Lear schrieb am 2006-07-05:
% cat t.d
void main() {
char[] buffer;
buffer.length = 0;
}
% dmd -v t.d
parse t
semantic t
semantic2 t
semantic3 t
code t
generating code for function 'main'
gcc t.o -o t -m32 -lphobos -lpthread -lm
t.o(.gnu.linkonce.t_Dmain+0x1f): In function `_Dmain':
: undefined reference to `_d_arraysetlength2'
collect2: ld returned 1 exit status
--- errorlevel 1
If I change char[] to int[], it works.
I can't replicate this issue. Did you rebuild Phobos or are you trying
to use GDC's GPhobos in combination with DMD?
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFErXYVLK5blCcjpWoRAkwcAKCKlW4xE/6cw+jd/Dtn1BM7D2FzVgCfdcB+
6CNSGNtXbByVcsZ8ADxmioY=
=G7Ov
-----END PGP SIGNATURE-----
Jul 06 2006









William S. Lear <William_member pathlink.com> 