Bug #10368 Compiling Mysql 5.0.4-beta with GCC4.0 fails on default.c
Submitted: 4 May 2005 20:26 Modified: 12 Jul 2005 4:20
Reporter: Charles Wyble Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0.4 beta OS:Linux (Linux 2.6.11 i686 debian)
Assigned to: CPU Architecture:Any

[4 May 2005 20:26] Charles Wyble
Description:
The compile of mysql 5.0.4-beta version fails when using gcc 4.0.0. I am attaching the relevant output....

Making all in strings
make[2]: Entering directory `/home/charles/job/software/gateway/mysql-5.0.4-beta/strings'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/charles/job/software/gateway/mysql-5.0.4-beta/strings'
Making all in mysys
make[2]: Entering directory `/home/charles/job/software/gateway/mysql-5.0.4-beta/mysys'
if gcc -DDEFAULT_BASEDIR=\"/usr/local/mysql\" -DDATADIR="\"/usr/local/mysql/var\"" -DDEFAULT_CHARSET_HOME="\"/usr/local/mysql\"" -DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DDEFAULT_HOME_ENV=MYSQL_HOME -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I.    -O3 -DDBUG_OFF    -MT default.o -MD -MP -MF ".deps/default.Tpo" -c -o default.o default.c; \
then mv -f ".deps/default.Tpo" ".deps/default.Po"; else rm -f ".deps/default.Tpo"; exit 1; fi
default.c: In function 'search_default_file_with_ext':
default.c:440: internal compiler error: in get_indirect_ref_operands, at tree-ssa-operands.c:1449
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[2]: *** [default.o] Error 1
make[2]: Leaving directory `/home/charles/job/software/gateway/mysql-5.0.4-beta/mysys'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/charles/job/software/gateway/mysql-5.0.4-beta'
make: *** [all] Error 2
?]0;charles@samuel: /home/charles/job/software/gateway/mysql-5.0.4-beta??[01;32mcharles@samuel?[00m:?[01;34m~/job/software/gateway/mysql-5.0.4-beta?[00m$ 
Script done on Wed 04 May 2005 12:58:59 PM PDT

From the file name (tree-ssa-operands.c) I presume it has something to do with the new Static Single Assignment (SSA)  features in Gcc. More info on SSA can be found at http://gcc.gnu.org/projects/tree-ssa/ and http://en.wikipedia.org/wiki/Static_single_assignment_form

How to repeat:
Just run configure && make.
[4 May 2005 20:41] MySQL Verification Team
Looking the error message, seems to be a compiler bug:
default.c:440: internal compiler error: in get_indirect_ref_operands, at
tree-ssa-operands.c:1449
[4 May 2005 20:55] Charles Wyble
No it is not a compiler bug. The compiler aborted because the code in MySQL was invalid. If you look at the gcc source code you will see that explained in the comments.
[4 Jun 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[5 Jun 2005 10:34] Sergei Golubchik
sorry, but I don't see whether in the gcc source code it is explained in the comments.
Could you quote the relevant part here ?
[5 Jul 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[5 Jul 2005 23:02] Charles Wyble
Where what is explained? Have you done the compile with gcc4? You need to follow the steps I outline and also read my bug report in its entirety.
[12 Jul 2005 4:20] Jorge del Conde
I was unable to reproduce this bug using 5.0.7 from bk