public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/51321] New: __builtin_types_compatible_p (any_type_t[1][], any_other_type_t) crashes GCC
@ 2011-11-27 8:37 hnarkaytis at gmail dot com
2011-11-27 10:19 ` [Bug c/51321] " hnarkaytis at gmail dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: hnarkaytis at gmail dot com @ 2011-11-27 8:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51321
Bug #: 51321
Summary: __builtin_types_compatible_p (any_type_t[1][],
any_other_type_t) crashes GCC
Classification: Unclassified
Product: gcc
Version: 4.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hnarkaytis@gmail.com
int main ()
{
return (__builtin_types_compatible_p (char[1][], char[1][1]));
}
cc -Wall -O2 -g bug.c -o bug
bug.c: In function 'main':
bug.c:3: error: array type has incomplete element type
bug.c:3: confused by earlier errors, bailing out
Preprocessed source stored into /tmp/ccPgaiXX.out file, please attach this to
your bugreport.
make: *** [bug] Error 1
// /usr/libexec/gcc/x86_64-redhat-linux/4.4.4/cc1 -quiet bug.c -quiet -dumpbase
bug.c -mtune=generic -auxbase bug -g -O2 -Wall -o - -frandom-seed=0
# 1 "bug.c"
# 1 "/home/smash/development/hello//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "bug.c"
int main ()
{
return (__builtin_types_compatible_p (char[1][], char[1][1]));
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/51321] __builtin_types_compatible_p (any_type_t[1][], any_other_type_t) crashes GCC
2011-11-27 8:37 [Bug c/51321] New: __builtin_types_compatible_p (any_type_t[1][], any_other_type_t) crashes GCC hnarkaytis at gmail dot com
@ 2011-11-27 10:19 ` hnarkaytis at gmail dot com
2011-11-29 7:09 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: hnarkaytis at gmail dot com @ 2011-11-27 10:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51321
--- Comment #1 from Herman Narkaytis <hnarkaytis at gmail dot com> 2011-11-27 07:27:23 UTC ---
gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--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.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.4 20100630 (Red Hat 4.4.4-10) (GCC)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/51321] __builtin_types_compatible_p (any_type_t[1][], any_other_type_t) crashes GCC
2011-11-27 8:37 [Bug c/51321] New: __builtin_types_compatible_p (any_type_t[1][], any_other_type_t) crashes GCC hnarkaytis at gmail dot com
2011-11-27 10:19 ` [Bug c/51321] " hnarkaytis at gmail dot com
@ 2011-11-29 7:09 ` pinskia at gcc dot gnu.org
2011-11-29 8:14 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-11-29 7:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51321
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |error-recovery,
| |ice-on-invalid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-11-29
Ever Confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-11-29 05:24:07 UTC ---
t34.c: In function ‘main’:
t34.c:3:2: error: array type has incomplete element type
t34.c:3:2: internal compiler error: tree check: expected class ‘type’, have
‘exceptional’ (error_mark) in c_parser_postfix_expression, at c-parser.c:6572
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Confirmed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/51321] __builtin_types_compatible_p (any_type_t[1][], any_other_type_t) crashes GCC
2011-11-27 8:37 [Bug c/51321] New: __builtin_types_compatible_p (any_type_t[1][], any_other_type_t) crashes GCC hnarkaytis at gmail dot com
2011-11-27 10:19 ` [Bug c/51321] " hnarkaytis at gmail dot com
2011-11-29 7:09 ` pinskia at gcc dot gnu.org
@ 2011-11-29 8:14 ` pinskia at gcc dot gnu.org
2011-11-30 20:04 ` pinskia at gcc dot gnu.org
2011-11-30 20:07 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-11-29 8:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51321
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |pinskia at gcc dot gnu.org
|gnu.org |
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-11-29 05:28:24 UTC ---
Semi-obvious patch:
Index: c-parser.c
===================================================================
--- c-parser.c (revision 181796)
+++ c-parser.c (working copy)
@@ -6568,9 +6568,16 @@ c_parser_postfix_expression (c_parser *p
"expected %<)%>");
{
tree e1, e2;
+ e1 = groktypename (t1, NULL, NULL);
+ e2 = groktypename (t2, NULL, NULL);
+ if (e1 == error_mark_node || e2 == error_mark_node)
+ {
+ expr.value = error_mark_node;
+ break;
+ }
- e1 = TYPE_MAIN_VARIANT (groktypename (t1, NULL, NULL));
- e2 = TYPE_MAIN_VARIANT (groktypename (t2, NULL, NULL));
+ e1 = TYPE_MAIN_VARIANT (e1);
+ e2 = TYPE_MAIN_VARIANT (e2);
expr.value
= comptypes (e1, e2) ? integer_one_node : integer_zero_node;
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/51321] __builtin_types_compatible_p (any_type_t[1][], any_other_type_t) crashes GCC
2011-11-27 8:37 [Bug c/51321] New: __builtin_types_compatible_p (any_type_t[1][], any_other_type_t) crashes GCC hnarkaytis at gmail dot com
` (2 preceding siblings ...)
2011-11-29 8:14 ` pinskia at gcc dot gnu.org
@ 2011-11-30 20:04 ` pinskia at gcc dot gnu.org
2011-11-30 20:07 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-11-30 20:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51321
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-11-30 19:55:41 UTC ---
Author: pinskia
Date: Wed Nov 30 19:55:36 2011
New Revision: 181857
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181857
Log:
2011-11-30 Andrew Pinski <apinski@cavium.com>
PR c/51321
* c-parser.c (c_parser_postfix_expression): Check groktypename results
before looking at the main variant.
2011-11-30 Andrew Pinski <apinski@cavium.com>
* gcc.dg/pr51321.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/pr51321.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-parser.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/51321] __builtin_types_compatible_p (any_type_t[1][], any_other_type_t) crashes GCC
2011-11-27 8:37 [Bug c/51321] New: __builtin_types_compatible_p (any_type_t[1][], any_other_type_t) crashes GCC hnarkaytis at gmail dot com
` (3 preceding siblings ...)
2011-11-30 20:04 ` pinskia at gcc dot gnu.org
@ 2011-11-30 20:07 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-11-30 20:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51321
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-11-30 19:56:35 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-11-30 19:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-27 8:37 [Bug c/51321] New: __builtin_types_compatible_p (any_type_t[1][], any_other_type_t) crashes GCC hnarkaytis at gmail dot com
2011-11-27 10:19 ` [Bug c/51321] " hnarkaytis at gmail dot com
2011-11-29 7:09 ` pinskia at gcc dot gnu.org
2011-11-29 8:14 ` pinskia at gcc dot gnu.org
2011-11-30 20:04 ` pinskia at gcc dot gnu.org
2011-11-30 20:07 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).