[Bug c++/29054] [4.0/4.1 Regression] ICE on friend template specialization
--- Comment #6 from jakub at gcc dot gnu dot org 2007-01-03 08:00 --- Subject: Bug 29054 Author: jakub Date: Wed Jan 3 08:00:30 2007 New Revision: 120384 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120384 Log: PR c++/29054 * g++.dg/template/friend49.C: New test. Added: trunk/gcc/testsuite/g++.dg/template/friend49.C Modified: trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29054
[Bug c++/29535] [4.1 Regression] ICE in instantiate_class_template, at cp/pt.c:5728
--- Comment #9 from jakub at gcc dot gnu dot org 2007-01-03 08:03 --- Subject: Bug 29535 Author: jakub Date: Wed Jan 3 08:03:26 2007 New Revision: 120385 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120385 Log: PR c++/29535 * g++.dg/template/crash66.C: New test. Added: trunk/gcc/testsuite/g++.dg/template/crash66.C Modified: trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29535
[Bug middle-end/30286] [4.1 Regression] Segfault with -O2 -ftrapv
--- Comment #3 from jakub at gcc dot gnu dot org 2007-01-03 08:04 --- Subject: Bug 30286 Author: jakub Date: Wed Jan 3 08:04:11 2007 New Revision: 120387 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120387 Log: PR middle-end/30286 * gcc.dg/pr30286.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr30286.c Modified: trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30286
[Bug c++/29054] [4.0/4.1 Regression] ICE on friend template specialization
--- Comment #7 from jakub at gcc dot gnu dot org 2007-01-03 08:06 --- Subject: Bug 29054 Author: jakub Date: Wed Jan 3 08:05:53 2007 New Revision: 120388 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120388 Log: PR c++/29054 * g++.dg/template/friend49.C: New test. Added: branches/gcc-4_2-branch/gcc/testsuite/g++.dg/template/friend49.C Modified: branches/gcc-4_2-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29054
[Bug c++/29535] [4.1 Regression] ICE in instantiate_class_template, at cp/pt.c:5728
--- Comment #10 from jakub at gcc dot gnu dot org 2007-01-03 08:06 --- Subject: Bug 29535 Author: jakub Date: Wed Jan 3 08:06:42 2007 New Revision: 120389 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120389 Log: PR c++/29535 * g++.dg/template/crash66.C: New test. Added: branches/gcc-4_2-branch/gcc/testsuite/g++.dg/template/crash66.C Modified: branches/gcc-4_2-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29535
[Bug middle-end/30286] [4.1 Regression] Segfault with -O2 -ftrapv
--- Comment #4 from jakub at gcc dot gnu dot org 2007-01-03 08:07 --- Subject: Bug 30286 Author: jakub Date: Wed Jan 3 08:07:33 2007 New Revision: 120390 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120390 Log: PR middle-end/30286 * gcc.dg/pr30286.c: New test. Added: branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/pr30286.c Modified: branches/gcc-4_2-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30286
[Bug c++/29054] [4.0/4.1 Regression] ICE on friend template specialization
--- Comment #8 from jakub at gcc dot gnu dot org 2007-01-03 08:11 --- Subject: Bug 29054 Author: jakub Date: Wed Jan 3 08:11:02 2007 New Revision: 120391 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120391 Log: PR c++/29054 * decl.c (revert_static_member_fn): Don't remove first argument without checking it is "this". * g++.dg/template/friend49.C: New test. Added: branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/friend49.C Modified: branches/gcc-4_1-branch/gcc/cp/ChangeLog branches/gcc-4_1-branch/gcc/cp/decl.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29054
[Bug c++/28261] [4.0/4.1 regression] ICE with enum in constructor definition
--- Comment #6 from jakub at gcc dot gnu dot org 2007-01-03 08:14 --- Subject: Bug 28261 Author: jakub Date: Wed Jan 3 08:13:50 2007 New Revision: 120392 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120392 Log: PR c++/29535 Backported from mainline 2006-10-17 Mark Mitchell <[EMAIL PROTECTED]> PR c++/28261 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New function. (cp_parser_constructor_declarator_p): Use it. (cp_parser_check_type_definition): Return a value indicating whether or not the definition is valid. (cp_parser_enum_specifier): Skip invalid enum definitions. PR c++/28261 * g++.dg/parse/enum3.C: New test. PR c++/29535 * g++.dg/template/crash66.C: New test. Added: branches/gcc-4_1-branch/gcc/testsuite/g++.dg/parse/enum3.C branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/crash66.C Modified: branches/gcc-4_1-branch/gcc/cp/ChangeLog branches/gcc-4_1-branch/gcc/cp/parser.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28261
[Bug c++/29535] [4.1 Regression] ICE in instantiate_class_template, at cp/pt.c:5728
--- Comment #11 from jakub at gcc dot gnu dot org 2007-01-03 08:14 --- Subject: Bug 29535 Author: jakub Date: Wed Jan 3 08:13:50 2007 New Revision: 120392 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120392 Log: PR c++/29535 Backported from mainline 2006-10-17 Mark Mitchell <[EMAIL PROTECTED]> PR c++/28261 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New function. (cp_parser_constructor_declarator_p): Use it. (cp_parser_check_type_definition): Return a value indicating whether or not the definition is valid. (cp_parser_enum_specifier): Skip invalid enum definitions. PR c++/28261 * g++.dg/parse/enum3.C: New test. PR c++/29535 * g++.dg/template/crash66.C: New test. Added: branches/gcc-4_1-branch/gcc/testsuite/g++.dg/parse/enum3.C branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/crash66.C Modified: branches/gcc-4_1-branch/gcc/cp/ChangeLog branches/gcc-4_1-branch/gcc/cp/parser.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29535
[Bug middle-end/30286] [4.1 Regression] Segfault with -O2 -ftrapv
--- Comment #5 from jakub at gcc dot gnu dot org 2007-01-03 08:15 --- Subject: Bug 30286 Author: jakub Date: Wed Jan 3 08:15:24 2007 New Revision: 120393 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120393 Log: PR middle-end/30286 * fold-const.c (negate_expr): Don't call fold_build1 for INTEGER_CST or REAL_CST. * gcc.dg/pr30286.c: New test. Added: branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr30286.c Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/fold-const.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30286
[Bug c++/29054] [4.0 Regression] ICE on friend template specialization
--- Comment #9 from jakub at gcc dot gnu dot org 2007-01-03 08:16 --- Fixed on gcc-4_1-branch. -- jakub at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Known to work|3.4.6 4.2.0 |3.4.6 4.2.0 4.1.2 Last reconfirmed|2006-09-13 11:39:13 |2007-01-03 08:16:35 date|| Summary|[4.0/4.1 Regression] ICE on |[4.0 Regression] ICE on |friend template |friend template |specialization |specialization http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29054
[Bug c++/29535] [4.1 Regression] ICE in instantiate_class_template, at cp/pt.c:5728
--- Comment #12 from jakub at gcc dot gnu dot org 2007-01-03 08:17 --- Fixed. -- jakub at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Known to fail|4.1.2 | Known to work|4.1.1 4.2.0 4.3.0 |4.1.1 4.1.2 4.2.0 4.3.0 Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29535
[Bug c++/28261] [4.0 regression] ICE with enum in constructor definition
--- Comment #7 from jakub at gcc dot gnu dot org 2007-01-03 08:18 --- Backported to 4.1. -- jakub at gcc dot gnu dot org changed: What|Removed |Added Summary|[4.0/4.1 regression] ICE|[4.0 regression] ICE with |with enum in constructor|enum in constructor |definition |definition http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28261
[Bug middle-end/30286] [4.1 Regression] Segfault with -O2 -ftrapv
--- Comment #6 from jakub at gcc dot gnu dot org 2007-01-03 08:19 --- Fixed. -- jakub at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Known to fail|4.1.2 | Known to work|4.0.2 4.2.0 4.3.0 |4.0.2 4.1.2 4.2.0 4.3.0 Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30286
[Bug bootstrap/29482] libcpp/configure - no usable dependency style found
--- Comment #3 from maxim dot yegorushkin at gmail dot com 2007-01-03 12:31 --- (In reply to comment #2) > I'm having a similar problem on Linux Fedora Core 5. Is there any quick way to > fix it? I am new to autoconf and would appreciate any hints. > > Here is the output: The same problem with Solaris 10: ... checking whether gcc supports -pedantic -Wno-long-long... yes checking dependency style of gcc... none configure: error: no usable dependency style found make[1]: *** [configure-libcpp] Error 1 make[1]: Leaving directory `/M/codebase/local/src/gcc/gcc-4.1.1-obj/SunOS5.10/amd64' make: *** [all] Error 2 $ uname -a SunOS xxx 5.10 Generic_118855-15 i86pc i386 i86pc Solaris -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29482
[Bug c++/30357] New: Enum typecast warning
I would appreciate adding the enumeration typecast warnings. I mean: When I cast one enum to another and the first enum is not a subset of the second warning will be shown. Example: enum EParent { EP_VAL0 = 0, EP_VAL1 = 1, EP_VAL2 = 2 }; enum EChild { EC_VAL0 = 0, EC_VAL1 = 1 }; int main() { EChild childValue; EParent parentValue; ... childValue = (EChild)parentValue; // Warning, because value 2 is not present in EChild. parentValue = (EParent)childValue; // Ok, because all EChild values are present in EParent. return 0; }; -- Summary: Enum typecast warning Product: gcc Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mareq at mailbox dot sk http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30357
[Bug java/28754] [4.2 regression] java.lang.nullPointerException while accessing final static members of an interface
--- Comment #9 from aph at gcc dot gnu dot org 2007-01-03 14:24 --- Subject: Bug 28754 Author: aph Date: Wed Jan 3 14:23:48 2007 New Revision: 120396 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120396 Log: 2007-01-03 Andrew Haley <[EMAIL PROTECTED]> PR java/28754 * expr.c (expand_java_field_op): If we're initializing a field's declaring interface we should not also initialize the class context in which it was referenced. Modified: branches/gcj/gcj-eclipse-merge-branch/gcc/java/ChangeLog branches/gcj/gcj-eclipse-merge-branch/gcc/java/expr.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28754
[Bug debug/30189] [4.1 Regression] ICE on modified_type_die
-- aoliva at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |aoliva at gcc dot gnu dot |dot org |org Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2007-01-03 16:37:20 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30189
[Bug c++/30357] Enum typecast warning
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-01-03 16:46 --- Related to PR 12242. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30357
[Bug fortran/27698] subroutine _foo draws "unclassifiable statement" instead of a useful error.
--- Comment #12 from patchapp at dberlin dot org 2007-01-03 16:50 --- Subject: Bug number PR27698 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00137.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27698
[Bug debug/30189] [4.1 Regression] ICE on modified_type_die
--- Comment #2 from patchapp at dberlin dot org 2007-01-03 17:05 --- Subject: Bug number PR debug/30189 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00140.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30189
[Bug testsuite/30358] New: New ICEs on trunk for IPA
These tests passed yesterday early morning, but give me ICEs today: Running /u01/var/tmp/gcc_trunk_svn/gcc/gcc/testsuite/gcc.dg/ipa/ipa.exp ... FAIL: gcc.dg/ipa/ipa-1.c (internal compiler error) FAIL: gcc.dg/ipa/ipa-1.c (test for excess errors) FAIL: gcc.dg/ipa/ipa-1.c scan-ipa-dump-times versioned function 2 FAIL: gcc.dg/ipa/ipa-1.c scan-ipa-dump-times propagating const 2 FAIL: gcc.dg/ipa/ipa-2.c (internal compiler error) FAIL: gcc.dg/ipa/ipa-2.c (test for excess errors) PASS: gcc.dg/ipa/ipa-2.c scan-ipa-dump-times versioned function 2 PASS: gcc.dg/ipa/ipa-2.c scan-ipa-dump-times propagating const 2 FAIL: gcc.dg/ipa/ipa-3.c (internal compiler error) FAIL: gcc.dg/ipa/ipa-3.c (test for excess errors) PASS: gcc.dg/ipa/ipa-3.c scan-ipa-dump-times versioned function 2 FAIL: gcc.dg/ipa/ipa-3.c scan-ipa-dump-times propagating const 3 FAIL: gcc.dg/ipa/ipa-4.c (internal compiler error) FAIL: gcc.dg/ipa/ipa-4.c (test for excess errors) PASS: gcc.dg/ipa/ipa-4.c scan-ipa-dump-times versioned function 1 PASS: gcc.dg/ipa/ipa-4.c scan-ipa-dump-times propagating const 1 FAIL: gcc.dg/ipa/ipa-5.c (internal compiler error) FAIL: gcc.dg/ipa/ipa-5.c (test for excess errors) PASS: gcc.dg/ipa/ipa-5.c scan-ipa-dump-times versioned function 2 PASS: gcc.dg/ipa/ipa-5.c scan-ipa-dump-times propagating const 2 FAIL: gcc.dg/ipa/ipa-6.c (internal compiler error) FAIL: gcc.dg/ipa/ipa-6.c (test for excess errors) Here's an example output: Running /u01/var/tmp/gcc_trunk_svn/gcc/gcc/testsuite/gcc.dg/ipa/ipa.exp ... Executing on host: /u01/var/tmp/gcc_trunk_svn/gcc_20070103/gcc/xgcc -B/u01/var/tmp/gcc_trunk_svn/gcc_20070103/gcc/ /u01/var/tmp/gcc_trunk_svn/gcc/gcc/testsuite/gcc.dg/ipa/ipa-1.c -O3 -fipa-cp -fdump-ipa-cp -fno-early-inlining -fno-show-column -S -o ipa-1.s(timeout = 300) /u01/var/tmp/gcc_trunk_svn/gcc/gcc/testsuite/gcc.dg/ipa/ipa-1.c: In function 'T.0': /u01/var/tmp/gcc_trunk_svn/gcc/gcc/testsuite/gcc.dg/ipa/ipa-1.c:22: error: expected an SSA_NAME object /u01/var/tmp/gcc_trunk_svn/gcc/gcc/testsuite/gcc.dg/ipa/ipa-1.c:22: error: in statement a = 7; /u01/var/tmp/gcc_trunk_svn/gcc/gcc/testsuite/gcc.dg/ipa/ipa-1.c:22: internal compiler error: verify_ssa failed Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. I'm running on Solaris 10 x86. Brett -- Summary: New ICEs on trunk for IPA Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: brett dot albertson at stratech dot com GCC build triplet: i386-pc-solaris2.10 GCC host triplet: i386-pc-solaris2.10 GCC target triplet: i386-pc-solaris2.10 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30358
[Bug fortran/20896] [4.2 and 4.1 only] ambiguous interface not detected
--- Comment #5 from patchapp at dberlin dot org 2007-01-03 18:05 --- Subject: Bug number PR20896 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00145.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20896
[Bug pch/13676] GCC failes to recognize files ending in .hpp as headers to be precompiled
--- Comment #13 from tromey at gcc dot gnu dot org 2007-01-03 19:17 --- I'm not sure whether the updated patch can be committed without another review. I'll try to find out. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13676
[Bug c/30360] New: Complex divide bug
/* { dg-options "-O0 -std=gnu99" } */ int main (void) { _Complex double d; __real__ d = 1.0; __imag__ d = 1.0; d = d / 0.0; if (!__builtin_isinf (__real__ d) || !__builtin_isinf (__imag__ d)) __builtin_abort (); return 0; } fails when compiled with -O0 -std=c99 but succeeds when compiled with -O2 -std=c99. ISO C99 says it should be (inf, inf) always in G.5.1 (4): "if the first operand is a nonzero finite number or an infinity and the second operand is a zero, then the result of the / operator is an infinity." The problem is that libgcc _divdc3 doesn't do logarithmic scaling: /* ??? We can get better behavior from logarithmic scaling instead of the division. But that would mean starting to link libgcc against libm. We could implement something akin to ldexp/frexp as gcc builtins fairly easily... */ if (FABS (c) < FABS (d)) { ratio = c / d; denom = (c * ratio) + d; x = ((a * ratio) + b) / denom; y = ((b * ratio) - a) / denom; } else { ratio = d / c; denom = (d * ratio) + c; x = ((b * ratio) + a) / denom; y = (b - (a * ratio)) / denom; } so when c == d == 0.0, denom is not 0.0 as later code is testing, but NaN. To fix this, I think we either need to switch to logarithmic scaling, or we need to special case FABS (c) == FABS (d) case, or the denom == 0.0 change ought should change (would c == 0.0 && d == 0.0 be enough?). -- Summary: Complex divide bug Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30360
[Bug fortran/30084] [4.2 and 4.1 only] segmentation fault when compiling certain code
--- Comment #8 from pault at gcc dot gnu dot org 2007-01-03 21:27 --- Subject: Bug 30084 Author: pault Date: Wed Jan 3 21:27:17 2007 New Revision: 120399 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120399 Log: 2007-01-03 Paul Thomas <[EMAIL PROTECTED]> Backport from trunk PR fortran/25818 * trans-array.c (gfc_trans_g77_array): If the variable is optional or not always present, make the statement conditional on presence of the argument. * gfortran.h : Add symbol_attribute not_always_present. * resolve.c (check_argument_lists): New function to check if arguments are not present in all entries. PR fortran/30084 * module.c (mio_component_ref): Move treatment of unique name variables, during output, to fix_mio_expr. (fix_mio_expr): New function that fixes defective expressions before they are written to the module file. (mio_expr): Call the new function. (resolve_entries): Call check_argument_lists. 2007-01-03 Paul Thomas <[EMAIL PROTECTED]> PR fortran/25818 * gfortran.dg/entry_array_specs_2.f: New test. PR fortran/30084 * gfortran.dg/nested_modules_6.f90: New test. Added: branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/entry_array_specs_2.f branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/nested_modules_6.f90 Modified: branches/gcc-4_2-branch/gcc/fortran/ChangeLog branches/gcc-4_2-branch/gcc/fortran/gfortran.h branches/gcc-4_2-branch/gcc/fortran/module.c branches/gcc-4_2-branch/gcc/fortran/resolve.c branches/gcc-4_2-branch/gcc/fortran/trans-array.c branches/gcc-4_2-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30084
[Bug fortran/25818] [4.2 and 4.1 only] Problem with handling optional and entry master arguments
--- Comment #22 from pault at gcc dot gnu dot org 2007-01-03 21:27 --- Subject: Bug 25818 Author: pault Date: Wed Jan 3 21:27:17 2007 New Revision: 120399 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120399 Log: 2007-01-03 Paul Thomas <[EMAIL PROTECTED]> Backport from trunk PR fortran/25818 * trans-array.c (gfc_trans_g77_array): If the variable is optional or not always present, make the statement conditional on presence of the argument. * gfortran.h : Add symbol_attribute not_always_present. * resolve.c (check_argument_lists): New function to check if arguments are not present in all entries. PR fortran/30084 * module.c (mio_component_ref): Move treatment of unique name variables, during output, to fix_mio_expr. (fix_mio_expr): New function that fixes defective expressions before they are written to the module file. (mio_expr): Call the new function. (resolve_entries): Call check_argument_lists. 2007-01-03 Paul Thomas <[EMAIL PROTECTED]> PR fortran/25818 * gfortran.dg/entry_array_specs_2.f: New test. PR fortran/30084 * gfortran.dg/nested_modules_6.f90: New test. Added: branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/entry_array_specs_2.f branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/nested_modules_6.f90 Modified: branches/gcc-4_2-branch/gcc/fortran/ChangeLog branches/gcc-4_2-branch/gcc/fortran/gfortran.h branches/gcc-4_2-branch/gcc/fortran/module.c branches/gcc-4_2-branch/gcc/fortran/resolve.c branches/gcc-4_2-branch/gcc/fortran/trans-array.c branches/gcc-4_2-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25818
[Bug fortran/25818] [4.1 only] Problem with handling optional and entry master arguments
--- Comment #23 from pault at gcc dot gnu dot org 2007-01-03 21:29 --- Fixed on trunk and 4.2 Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Summary|[4.2 and 4.1 only] Problem |[4.1 only] Problem with |with handling optional and |handling optional and entry |entry master arguments |master arguments http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25818
[Bug fortran/30084] [4.1 only] segmentation fault when compiling certain code
--- Comment #9 from pault at gcc dot gnu dot org 2007-01-03 21:30 --- Fixed on trunk and 4.2 Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Summary|[4.2 and 4.1 only] |[4.1 only] segmentation |segmentation fault when |fault when compiling certain |compiling certain code |code http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30084
[Bug c/30360] Complex divide bug
--- Comment #1 from joseph at codesourcery dot com 2007-01-03 21:31 --- Subject: Re: New: Complex divide bug On Wed, 3 Jan 2007, jakub at gcc dot gnu dot org wrote: > fails when compiled with -O0 -std=c99 but succeeds when compiled with -O2 > -std=c99. ISO C99 says it should be (inf, inf) always in G.5.1 (4): > "if the first operand is a nonzero finite number or an infinity and the second > operand is a zero, then the result of the / operator is an infinity." "is an infinity" allows (inf, NaN) and (NaN, inf), it doesn't require (inf, inf) (G.3#1: "A complex or imaginary value with at least one infinite part is regarded as an infinity (even if its other part is a NaN)."). Thus at least the testcase needs to change. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30360
[Bug other/30361] New: Documentation: Example usage of __attribute__((visibility("hidden"))) misleading
The documentation for the visibility attribute shown by the "info gcc 'c extension' function" command is misleading. It says: "`visibility ("VISIBILITY_TYPE")' The `visibility' attribute on ELF targets causes the declaration to be emitted with default, hidden, protected or internal visibility. void __attribute__ ((visibility ("protected"))) f () { /* Do something. */; } int i __attribute__ ((visibility ("hidden")));" Note that the attribute is attached to the return type of the function "f", not the function declaration itself. I think this means that the hidden visibility is applied to the type, not the function, which is strange. I'm looking at the documentation from gcc trunk. -- Summary: Documentation: Example usage of __attribute__((visibility("hidden"))) misleading Product: gcc Version: unknown Status: UNCONFIRMED Severity: minor Priority: P3 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rich at phekda dot gotadsl dot co dot uk GCC build triplet: Not applicable GCC host triplet: Not applicable GCC target triplet: Not applicable http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30361
[Bug other/30361] Documentation: Example usage of __attribute__((visibility("hidden"))) misleading
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-01-03 21:43 --- > Note that the attribute is attached to the return type of the function "f", > not > the function declaration itself. I think this means that the hidden visibility > is applied to the type, not the function, which is strange. That is because that is how attributes on function definitions work. this is really unrelated to visibility in general but attributes. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30361
[Bug other/30361] Documentation: Example usage of __attribute__((visibility("hidden"))) misleading
--- Comment #2 from rich at phekda dot gotadsl dot co dot uk 2007-01-03 21:45 --- Created an attachment (id=12853) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12853&action=view) A test case When I compile the attached test case, I get: [EMAIL PROTECTED] test-cases]$ make g++ -W -Wall -ghidden.cpp -o hidden hidden.cpp:5: warning: 'visibility' attribute ignored on non-class types Line 5 refers to the declaration with the attribute attached to the return type. Looking at the generated ELF file, I see that "func" is not hidden, but "func2" is: [EMAIL PROTECTED] test-cases]$ readelf -s hidden | c++filt | grep func 51: 080487f223 FUNCLOCAL DEFAULT 12 global constructors keyed to _Z4funcv 53: 08049e80 4 OBJECT LOCAL DEFAULT 25 func2()::foo2 55: 08049e90 4 OBJECT LOCAL DEFAULT 25 func()::foo 59: 08049e78 8 OBJECT LOCAL DEFAULT 25 guard variable for func2()::foo2 60: 08049e88 8 OBJECT LOCAL DEFAULT 25 guard variable for func()::foo 89: 080488fa 220 FUNCGLOBAL DEFAULT 12 func() 99: 0804881e 220 FUNCGLOBAL HIDDEN 12 func2() Version information: [EMAIL PROTECTED] test-cases]$ gcc --version gcc (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [EMAIL PROTECTED] test-cases]$ ld --version GNU ld version 2.17.50.0.3-6 20060715 Copyright 2005 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. [EMAIL PROTECTED] test-cases]$ cat /etc/redhat-release Fedora Core release 6 (Zod) [EMAIL PROTECTED] test-cases]$ rpm -q gcc gcc-4.1.1-30 [EMAIL PROTECTED] test-cases]$ rpm -q binutils binutils-2.17.50.0.3-6 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30361
[Bug other/30361] Documentation: Example usage of __attribute__((visibility("hidden"))) misleading
--- Comment #3 from pinskia at gcc dot gnu dot org 2007-01-03 21:45 --- Read: http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Attribute-Syntax.html Which describes the syntax. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30361
[Bug other/30361] Documentation: Example usage of __attribute__((visibility("hidden"))) misleading
--- Comment #4 from pinskia at gcc dot gnu dot org 2007-01-03 21:46 --- gcc (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30) This should also tell you, that you are using a modified version of the compiler and the bug report should have been filed up with redhat first. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30361
[Bug other/30362] New: Problems loading Openen Office 2
Folks, Not sure what if youc an help. By way of background, I'm running FreeBSD 6.1-RELEASE #0: Sun May 7 04:42:56 UTC 2006. Very nice indeed. AFter some littel experience usign Linus (RH9, FC4 & FC5), I have ventured into less chartered waters. What better way to learn to plunge int the deep end? Being a Newbie to FreeBSD, I'm experienceing some "fun" loading Open Office 2. Here is a copy of my history;- ~~~ 454 20:20 cd openoffice.org-2 455 20:20 make install 456 20:32 host 192.168.10.60 457 20:36 ./home/nick2/gnomelogalyzer.sh 458 20:36 cat /home/nick2/gnomelogalyzer.sh 459 20:37 . /home/nick2/gnomelogalyzer.sh 460 20:37 run /home/nick2/gnomelogalyzer.sh 461 20:38 run /home/nick2/gnomelogalyzer 462 20:38 ./home/nick2/gnomelogalyzer 463 20:38 /home/nick2/gnomelogalyzer.sh 464 20:40 /home/nick2/gnomelogalyzer.sh 465 20:40 ll /home/nick2/gnomelogalyzer.sh 466 20:41 whoami 467 20:41 whoami 468 20:42 chmod g+x /home/nick2/gnomelogalyzer.sh 469 20:42 ll /home/nick2/gnomelogalyzer.sh 470 20:42 /home/nick2/gnomelogalyzer.sh 471 20:58 portupgrade -f p5-\* 472 8:40portupdate -f intltool 473 8:40portupgrade -f intltool 474 9:00pwd 475 9:00make install ~~~ Pretty standard I would suspect - but then, I'm no expert at this. The following is a snippet form the console log;- ~~~ Making: ../../../unxfbsdi.pro/slb/dict_ja.lib ../../../unxfbsdi.pro/bin/gendict zh.dic ../../../unxfbsdi.pro/misc/dict_zh.cxx -- Making: ../../../unxfbsdi.pro/slo/dict_zh.obj g++-ooo -fmessage-length=0 -c -Os -fno-strict-aliasing -I. -I../../../unxfbsdi.pro/inc/dict -I../inc -I../../../inc/pch -I../../../inc -I../../../unx/inc -I../../../unxfbsdi.pro/inc -I. -I/usr/ports/editors/openoffice.org-2/work/OOD680_m5/solver/680/unxfbsdi.pro/inc/stl -I/usr/ports/editors/openoffice.org-2/work/OOD680_m5/solver/680/unxfbsdi.pro/inc/external -I/usr/ports/editors/openoffice.org-2/work/OOD680_m5/solver/680/unxfbsdi.pro/inc -I/usr/ports/editors/openoffice.org-2/work/OOD680_m5/solenv/unxfbsdi/inc -I/usr/ports/editors/openoffice.org-2/work/OOD680_m5/solenv/inc -I/usr/ports/editors/openoffice.org-2/work/OOD680_m5/res -I/usr/ports/editors/openoffice.org-2/work/OOD680_m5/solver/680/unxfbsdi.pro/inc/stl -I/usr/ports/editors/openoffice.org-2/work/OOD680_m5/solenv/inc/Xp31 -I/usr/local/diablo-jdk1.5.0/include -I/usr/local/diablo-jdk1.5.0/include/freebsd -I/usr/local/diablo-jdk1.5.0/include/bsd -I/usr/local/diablo-jdk1.5.0/include/linux -I/usr/local/diablo-jdk1.5.0/include/native_threads/include -I/usr/X11R6/include -I/usr/ports/editors/openoffice.org-2/work/OOD680_m5/solver/680/unxfbsdi.pro/inc/offuh -I. -I../../../res -I. -pipe -mtune=pentiumpro -fvisibility-inlines-hidden -g1 -fno-exceptions -Wall -Wextra -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fpic -DFREEBSD -DUNX -DVCL -DGCC -DC341 -DINTEL -DCVER=C341 -DX86 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=450 -DHAVE_GCC_VISIBILITY_FEATURE -D__DMAKE -DUNIX -DCPPU_ENV=gcc3 -DGXX_INCLUDE_PATH=/usr/local/gcc-ooo/i386-portbld-freebsd6.1/3.4.1/include/c++ -DSUPD=680 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DEXCEPTIONS_OFF -DCUI -DSOLAR_JAVA -DOOD680=OOD680 -DSHAREDLIB -D_DLL_ -DMULTITHREAD -o ../../../unxfbsdi.pro/slo/dict_zh.o ../../../unxfbsdi.pro/misc/dict_zh.cxx g++-ooo: Internal error: Killed: 9 (program cc1plus) Please submit a full bug report. See http://gcc.gnu.org/bugs.html> for instructions. dmake: Error code 1, while making '../../../unxfbsdi.pro/slo/dict_zh.obj' '---* tg_merge.mk *---' ERROR: Error 65280 occurred while making /usr/ports/editors/openoffice.org-2/work/OOD680_m5/i18npool/source/breakiterator/data dmake: Error code 1, while making 'build_instsetoo_native' '---* *---' *** Error code 255 Stop in /usr/ports/editors/openoffice.org-2. ~~~ So, can someone please tell me somethign about the error and and to overcome it? Happy New Year, Nicholas K -- Summary: Problems loading Openen Office 2 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: vk3ty at bigpond dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30362
[Bug other/30361] Documentation: Example usage of __attribute__((visibility("hidden"))) misleading
--- Comment #5 from rich at phekda dot gotadsl dot co dot uk 2007-01-03 21:55 --- Thanks for the quick response and the reference to the attribute documentation. I agree my comment about the documentation being incorrect is wrong. But it doesn't look to me like the visibility is correct for my test program. I'll try to reproduce this with vanilla trunk gcc & binutils. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30361
[Bug target/20353] uclibc does not provide C99 math functions
--- Comment #9 from pinskia at gcc dot gnu dot org 2007-01-03 23:00 --- Subject: Bug 20353 Author: pinskia Date: Wed Jan 3 23:00:40 2007 New Revision: 120404 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120404 Log: 2007-01-03 Andrew Pinski <[EMAIL PROTECTED]> PR middle-end/20353 * gimplify.c (gimplify_modify_expr_complex_part): Move below tree_to_gimple_tuple. Call tree_to_gimple_tuple when we need the value. 2007-01-03 Andrew Pinski <[EMAIL PROTECTED]> PR middle-end/30353 * gcc.c-torture/compile/complex-4.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/complex-4.c Modified: trunk/gcc/ChangeLog trunk/gcc/gimplify.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20353
[Bug tree-optimization/30353] [4.3 Regression] internal compiler error in remove_useless_stmts_1, at tree-cfg.c:1882
--- Comment #3 from pinskia at gcc dot gnu dot org 2007-01-03 23:00 --- Subject: Bug 30353 Author: pinskia Date: Wed Jan 3 23:00:40 2007 New Revision: 120404 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120404 Log: 2007-01-03 Andrew Pinski <[EMAIL PROTECTED]> PR middle-end/20353 * gimplify.c (gimplify_modify_expr_complex_part): Move below tree_to_gimple_tuple. Call tree_to_gimple_tuple when we need the value. 2007-01-03 Andrew Pinski <[EMAIL PROTECTED]> PR middle-end/30353 * gcc.c-torture/compile/complex-4.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/complex-4.c Modified: trunk/gcc/ChangeLog trunk/gcc/gimplify.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30353
[Bug tree-optimization/30353] [4.3 Regression] internal compiler error in remove_useless_stmts_1, at tree-cfg.c:1882
--- Comment #4 from pinskia at gcc dot gnu dot org 2007-01-03 23:00 --- Fixed. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30353
[Bug c++/28217] [4.0/4.1 regression] ICE in tree_int_cst_sgn
--- Comment #17 from jakub at gcc dot gnu dot org 2007-01-03 23:53 --- Subject: Bug 28217 Author: jakub Date: Wed Jan 3 23:53:18 2007 New Revision: 120410 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120410 Log: PR c++/28217 * g++.dg/pch/template-1.C: New test. * g++.dg/pch/template-1.Hs: New file. Added: trunk/gcc/testsuite/g++.dg/pch/template-1.C trunk/gcc/testsuite/g++.dg/pch/template-1.Hs Modified: trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28217
[Bug c++/28217] [4.0/4.1 regression] ICE in tree_int_cst_sgn
--- Comment #18 from jakub at gcc dot gnu dot org 2007-01-03 23:54 --- Subject: Bug 28217 Author: jakub Date: Wed Jan 3 23:54:24 2007 New Revision: 120411 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120411 Log: PR c++/28217 * g++.dg/pch/template-1.C: New test. * g++.dg/pch/template-1.Hs: New file. Added: branches/gcc-4_2-branch/gcc/testsuite/g++.dg/pch/template-1.C branches/gcc-4_2-branch/gcc/testsuite/g++.dg/pch/template-1.Hs Modified: branches/gcc-4_2-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28217
[Bug c++/28217] [4.0/4.1 regression] ICE in tree_int_cst_sgn
--- Comment #19 from jakub at gcc dot gnu dot org 2007-01-03 23:56 --- Subject: Bug 28217 Author: jakub Date: Wed Jan 3 23:56:44 2007 New Revision: 120412 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120412 Log: Backported from mainline 2006-07-12 Jason Merrill <[EMAIL PROTECTED]> PR c++/28217 * semantics.c (note_decl_for_pch): Don't premangle templates. * g++.dg/pch/template-1.C: New test. * g++.dg/pch/template-1.Hs: New file. Added: branches/gcc-4_1-branch/gcc/testsuite/g++.dg/pch/template-1.C branches/gcc-4_1-branch/gcc/testsuite/g++.dg/pch/template-1.Hs Modified: branches/gcc-4_1-branch/gcc/cp/ChangeLog branches/gcc-4_1-branch/gcc/cp/semantics.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28217
[Bug c++/28217] [4.0 regression] ICE in tree_int_cst_sgn
--- Comment #20 from jakub at gcc dot gnu dot org 2007-01-04 00:01 --- Fixed in 4.1 as well. -- jakub at gcc dot gnu dot org changed: What|Removed |Added Known to work|4.2.0 |4.1.2 4.2.0 Summary|[4.0/4.1 regression] ICE in |[4.0 regression] ICE in |tree_int_cst_sgn|tree_int_cst_sgn http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28217
[Bug target/16634] arm-elf-gcc problems when generating code for __attribute__ ((interrupt ("IRQ")))
--- Comment #6 from pbrook at gcc dot gnu dot org 2007-01-04 00:09 --- Subject: Bug 16634 Author: pbrook Date: Thu Jan 4 00:09:48 2007 New Revision: 120413 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120413 Log: 2007-01-03 Paul Brook <[EMAIL PROTECTED]> PR target/16634 gcc/ * config/arm/arm.c (output_return_instruction): Pop PC in interrupt functions. (use_return_insn): Return 0 for Thumb interrupt functions. (print_multi_reg): Add rfe argument for IRQ returns. (arm_output_epilogue): Pop interrupt return address directly into PC. (arm_expand_prologue): Only adjust IRQ return address in Arm mode. Modified: trunk/gcc/ChangeLog trunk/gcc/config/arm/arm.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16634
[Bug middle-end/29683] Arg split between stack/regs can cause stack corruption
--- Comment #3 from jconner at gcc dot gnu dot org 2007-01-04 01:37 --- Subject: Bug 29683 Author: jconner Date: Thu Jan 4 01:37:15 2007 New Revision: 120425 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120425 Log: 2007-03-01 Josh Conner <[EMAIL PROTECTED]> PR middle-end/29683 * calls.c (compute_argument_addresses): Set stack and stack_slot for partial args, too. (store_one_arg): Use locate.size.constant for the size when generating a save_area. 2007-03-01 Josh Conner <[EMAIL PROTECTED]> PR middle-end/29683 * gcc.dg/pr29683.c: New. Added: trunk/gcc/testsuite/gcc.dg/pr29683.c Modified: trunk/gcc/ChangeLog trunk/gcc/calls.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29683
Support for -traditional-cpp is incomplete in current gcc relative to gcc 2.95.3
Given the following test case: #define f(x, y) "x y" extern void abort (void); int main () { const char *str1 = f("a", "\"a\""); const char *str2 = f( \t, " \t"); if (strcmp (str1, "\"a\" \"\\\"a\\\"\"")) abort (); if (strcmp (str2, "\t \" \\t\"")) abort (); return 0; } Gcc 2.95.3 will accept it and do the right thing: $ gcc -v Reading specs from /opt/local/fsf/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs gcc version 2.95.3 20010315 (release) $ gcc -traditional-cpp -o macroargs macroargs.c $ ./macroargs $ Current gcc 4.X fails to accept this code. For example, using the Fedora Core 6 compiler: $ /usr/bin/gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20061011 (Red Hat 4.1.1-30) $ /usr/bin/gcc -traditional-cpp -o macroargs macroargs.c macroargs.c: In function ‘main’: macroargs.c:7: error: expected ‘,’ or ‘;’ before ‘a’ macroargs.c:7: error: stray ‘\’ in program macroargs.c:7: error: missing terminating " character macroargs.c:8: error: stray ‘\’ in program macroargs.c:12: error: ‘str2’ undeclared (first use in this function) macroargs.c:12: error: (Each undeclared identifier is reported only once macroargs.c:12: error: for each function it appears in.) The attached patch (also posted to gcc-patches) will fix it, although it's handling of quoted arguments is not exactly identical to gcc 2.95.3. Notice the difference between the test case above, and the test case included with the patch. Here is an example of a patched gcc's behavior: $ /opt/specifix/experimental/bin/gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: /src/specifix/experimental/src/gcc/configure --enable-languages=c,c++,fortran --prefix=/opt/specifix/experimental --disable-werror --disable-bootstrap --with-mpfr=/opt/specifix/experimental --with-gmp=/opt/specifix/experimental --cache-file=/dev/null --srcdir=/src/specifix/experimental/src/gcc Thread model: posix gcc version 4.3.0 20061231 (experimental) $ /opt/specifix/experimental/bin/gcc -traditional-cpp -o macroargs macroargs.c $ Note however that the above test case WILL abort if run, while the test case included with the patch will not, due to the handling of leading and trailing whitespace in macro args. See the code inside "#if 0 ... #endif" in the patch and the associated comments. Either the current gcc testsuite is wrong in how it tests for this whitespace, or gcc 2.95.3 is wrong. It's not clear to me which behavior is more correct. -Fred Index: gcc/gcc/testsuite/ChangeLog.specifix === RCS file: gcc/gcc/testsuite/ChangeLog.specifix diff -N gcc/gcc/testsuite/ChangeLog.specifix --- /dev/null 1 Jan 1970 00:00:00 - +++ gcc/gcc/testsuite/ChangeLog.specifix 13 Aug 2006 20:59:50 - @@ -0,0 +1,4 @@ +2006-08-11 Fred Fish <[EMAIL PROTECTED]> + + * gcc.dg/cpp/trad/macroargs.c: Add code to test quoting in + macro expansions. Index: gcc/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c === RCS file: /cvsroots/latest/src/gcc/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 macroargs.c --- gcc/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c 8 Oct 2005 18:59:16 - 1.1.1.1 +++ gcc/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c 13 Aug 2006 20:58:12 - @@ -8,6 +8,17 @@ extern void abort (void); +void testquoting () +{ + const char *str1 = f("a", "\"a\""); + const char *str2 = f( \t, " \t"); + + if (strcmp (str1, "\"a\" \"\\\"a\\\"\"")) +abort (); + if (strcmp (str2, " \t \" \\t\"")) +abort (); +} + int main () { const char *str1 = f( foo ,bar); @@ -26,5 +37,7 @@ foo , 2"), "1 , 2")) abort (); + testquoting (); + return 0; } Index: gcc/libcpp/ChangeLog.specifix === RCS file: gcc/libcpp/ChangeLog.specifix diff -N gcc/libcpp/ChangeLog.specifix --- /dev/null 1 Jan 1970 00:00:00 - +++ gcc/libcpp/ChangeLog.specifix 13 Aug 2006 20:59:01 - @@ -0,0 +1,7 @@ +2006-08-09 Fred Fish <[EMAIL PROTECTED]> + + * traditional.c (replace_args_and_push): Add local variable + cxtquote, calculate the replacement text size assuming a + worst case of every input character quoted with backslash, + and properly handle output quoting of quote characters in + actual arguments used in function-like macr
[Bug preprocessor/30363] New: Support for -traditional-cpp is incomplete in current gcc relative to gcc 2.95.3
Given the following test case: #define f(x, y) "x y" extern void abort (void); int main () { const char *str1 = f("a", "\"a\""); const char *str2 = f( \t, " \t"); if (strcmp (str1, "\"a\" \"\\\"a\\\"\"")) abort (); if (strcmp (str2, "\t \" \\t\"")) abort (); return 0; } Gcc 2.95.3 will accept it and do the right thing: $ gcc -v Reading specs from /opt/local/fsf/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs gcc version 2.95.3 20010315 (release) $ gcc -traditional-cpp -o macroargs macroargs.c $ ./macroargs $ Current gcc 4.X fails to accept this code. For example, using the Fedora Core 6 compiler: $ /usr/bin/gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20061011 (Red Hat 4.1.1-30) $ /usr/bin/gcc -traditional-cpp -o macroargs macroargs.c macroargs.c: In function main: macroargs.c:7: error: expected , or ; before a macroargs.c:7: error: stray \ in program macroargs.c:7: error: missing terminating " character macroargs.c:8: error: stray \ in program macroargs.c:12: error: str2 undeclared (first use in this function) macroargs.c:12: error: (Each undeclared identifier is reported only once macroargs.c:12: error: for each function it appears in.) The attached patch (also posted to gcc-patches) will fix it, although it's handling of quoted arguments is not exactly identical to gcc 2.95.3. Notice the difference between the test case above, and the test case included with the patch. Here is an example of a patched gcc's behavior: $ /opt/specifix/experimental/bin/gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: /src/specifix/experimental/src/gcc/configure --enable-languages=c,c++,fortran --prefix=/opt/specifix/experimental --disable-werror --disable-bootstrap --with-mpfr=/opt/specifix/experimental --with-gmp=/opt/specifix/experimental --cache-file=/dev/null --srcdir=/src/specifix/experimental/src/gcc Thread model: posix gcc version 4.3.0 20061231 (experimental) $ /opt/specifix/experimental/bin/gcc -traditional-cpp -o macroargs macroargs.c $ Note however that the above test case WILL abort if run, while the test case included with the patch will not, due to the handling of leading and trailing whitespace in macro args. See the code inside "#if 0 ... #endif" in the patch and the associated comments. Either the current gcc testsuite is wrong in how it tests for this whitespace, or gcc 2.95.3 is wrong. It's not clear to me which behavior is more correct. -- Summary: Support for -traditional-cpp is incomplete in current gcc relative to gcc 2.95.3 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: fnf at specifixinc dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30363