public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27648]  New: ICE on alias attribute casting
@ 2006-05-17 19:55 thor at math dot tu-berlin dot de
  2006-05-17 20:58 ` [Bug c++/27648] [4.0/4.1/4.2 Regression] ICE on attribute on pointers in static_cast pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: thor at math dot tu-berlin dot de @ 2006-05-17 19:55 UTC (permalink / raw)
  To: gcc-bugs

Enter the following program:

int main(int argc,char **argv)
{
  float x = 0.9;
  long y  = reinterpret_cast<long &>(static_cast<float
&__attribute((may_alias))> x);

  return y;
}

and compile with 

$ g++-4.0 -O3 -Wall aliastest.cpp

Result is:

aliastest.cpp: In function 'int main(int, char**)':
aliastest.cpp:4: 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.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.

The same bug also applies to g++-4.1.


-- 
           Summary: ICE on alias attribute casting
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: thor at math dot tu-berlin dot de
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27648


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/27648] [4.0/4.1/4.2 Regression] ICE on attribute on pointers in static_cast
  2006-05-17 19:55 [Bug c++/27648] New: ICE on alias attribute casting thor at math dot tu-berlin dot de
@ 2006-05-17 20:58 ` pinskia at gcc dot gnu dot org
  2006-05-21 21:12 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-17 20:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-05-17 20:58 -------
Reduced testcase:
int main(int argc,char **argv)
{
  int *t = 0;
  static_cast<int* __attribute((mode(SI) ))>( t);
}
----
This has nothing to do with the may_alias attribute but instead attributes on
pointers in a static cast.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.0.0 4.1.0 4.2.0
   Last reconfirmed|0000-00-00 00:00:00         |2006-05-17 20:58:30
               date|                            |
            Summary|ICE on alias attribute      |[4.0/4.1/4.2 Regression] ICE
                   |casting                     |on attribute on pointers in
                   |                            |static_cast
   Target Milestone|---                         |4.0.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27648


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/27648] [4.0/4.1/4.2 Regression] ICE on attribute on pointers in static_cast
  2006-05-17 19:55 [Bug c++/27648] New: ICE on alias attribute casting thor at math dot tu-berlin dot de
  2006-05-17 20:58 ` [Bug c++/27648] [4.0/4.1/4.2 Regression] ICE on attribute on pointers in static_cast pinskia at gcc dot gnu dot org
@ 2006-05-21 21:12 ` pinskia at gcc dot gnu dot org
  2006-05-22 18:40 ` janis at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-21 21:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-05-21 21:11 -------
Janis, could you do a regression hunt on this bug, using the testcase in
comment #1?

Thanks,
Andrew Pinski


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |janis at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27648


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/27648] [4.0/4.1/4.2 Regression] ICE on attribute on pointers in static_cast
  2006-05-17 19:55 [Bug c++/27648] New: ICE on alias attribute casting thor at math dot tu-berlin dot de
  2006-05-17 20:58 ` [Bug c++/27648] [4.0/4.1/4.2 Regression] ICE on attribute on pointers in static_cast pinskia at gcc dot gnu dot org
  2006-05-21 21:12 ` pinskia at gcc dot gnu dot org
@ 2006-05-22 18:40 ` janis at gcc dot gnu dot org
  2006-05-22 18:44   ` Andrew Pinski
  2006-05-22 18:45 ` pinskia at physics dot uc dot edu
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 13+ messages in thread
From: janis at gcc dot gnu dot org @ 2006-05-22 18:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from janis at gcc dot gnu dot org  2006-05-22 18:40 -------
I get errors for both the submitter's testcase and the testcase in comment #1. 
With the comment #1 testcase on powerpc-linux:

elm3b11% /opt/gcc-nightly/3.4/bin/g++ -c 27648.cc
27648.cc: In function `int main(int, char**)':
27648.cc:4: error: expected `>' before "__attribute__"
27648.cc:4: error: expected `(' before "__attribute__"
27648.cc:4: error: expected primary-expression before "__attribute__"
27648.cc:4: error: expected `)' before "__attribute__"
27648.cc:4: error: expected `;' before "__attribute__"

elm3b11% /home/janis/tools/gcc-3.3.5-ppc32/bin/g++ -c 27648.cc
27648.cc: In function `int main(int, char**)':
27648.cc:4: error: invalid type modifier within pointer declarator

elm3b11% /home/janis/tools/gcc-3.2.3-ppc32/bin/g++ -c 27648.cc
27648.cc: In function `int main(int, char**)':
27648.cc:4: invalid type modifier within pointer declarator

Is the testcase valid code?  I can do a regression hunt for when the compiler
started getting the ICE instead of errors, but is that helpful?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27648


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Bug c++/27648] [4.0/4.1/4.2 Regression] ICE on attribute on pointers in static_cast
  2006-05-22 18:40 ` janis at gcc dot gnu dot org
@ 2006-05-22 18:44   ` Andrew Pinski
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Pinski @ 2006-05-22 18:44 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs

> 
> 
> 
> ------- Comment #3 from janis at gcc dot gnu dot org  2006-05-22 18:40 -------
> I get errors for both the submitter's testcase and the testcase in comment #1. 
> With the comment #1 testcase on powerpc-linux:
> 
> Is the testcase valid code?  I can do a regression hunt for when the compiler
> started getting the ICE instead of errors, but is that helpful?

Yes it is valid though rejected.  Yes it is still helpful to figure
out when the ICE started to happen.

-- Pinski


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/27648] [4.0/4.1/4.2 Regression] ICE on attribute on pointers in static_cast
  2006-05-17 19:55 [Bug c++/27648] New: ICE on alias attribute casting thor at math dot tu-berlin dot de
                   ` (2 preceding siblings ...)
  2006-05-22 18:40 ` janis at gcc dot gnu dot org
@ 2006-05-22 18:45 ` pinskia at physics dot uc dot edu
  2006-05-22 23:02 ` janis at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: pinskia at physics dot uc dot edu @ 2006-05-22 18:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at physics dot uc dot edu  2006-05-22 18:44 -------
Subject: Re:  [4.0/4.1/4.2 Regression] ICE on attribute on pointers in
static_cast

> 
> 
> 
> ------- Comment #3 from janis at gcc dot gnu dot org  2006-05-22 18:40 -------
> I get errors for both the submitter's testcase and the testcase in comment #1. 
> With the comment #1 testcase on powerpc-linux:
> 
> Is the testcase valid code?  I can do a regression hunt for when the compiler
> started getting the ICE instead of errors, but is that helpful?

Yes it is valid though rejected.  Yes it is still helpful to figure
out when the ICE started to happen.

-- Pinski


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27648


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/27648] [4.0/4.1/4.2 Regression] ICE on attribute on pointers in static_cast
  2006-05-17 19:55 [Bug c++/27648] New: ICE on alias attribute casting thor at math dot tu-berlin dot de
                   ` (3 preceding siblings ...)
  2006-05-22 18:45 ` pinskia at physics dot uc dot edu
@ 2006-05-22 23:02 ` janis at gcc dot gnu dot org
  2006-06-04 19:11 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: janis at gcc dot gnu dot org @ 2006-05-22 23:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from janis at gcc dot gnu dot org  2006-05-22 23:02 -------
A regression hunt for mainline on powerpc-linux identified this patch as the
one for which the testcase starts getting an ICE instead of the error messages
shown for GCC 3.4 (branch) in comment #3:

http://gcc.gnu.org/viewcvs?view=rev&rev=83482

r83482 | mmitchel | 2004-06-22 07:18:38 +0000 (Tue, 22 Jun 2004)


-- 

janis at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mmitchel at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27648


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/27648] [4.0/4.1/4.2 Regression] ICE on attribute on pointers in static_cast
  2006-05-17 19:55 [Bug c++/27648] New: ICE on alias attribute casting thor at math dot tu-berlin dot de
                   ` (4 preceding siblings ...)
  2006-05-22 23:02 ` janis at gcc dot gnu dot org
@ 2006-06-04 19:11 ` mmitchel at gcc dot gnu dot org
  2006-06-15  0:06 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-04 19:11 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27648


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/27648] [4.0/4.1/4.2 Regression] ICE on attribute on pointers in static_cast
  2006-05-17 19:55 [Bug c++/27648] New: ICE on alias attribute casting thor at math dot tu-berlin dot de
                   ` (5 preceding siblings ...)
  2006-06-04 19:11 ` mmitchel at gcc dot gnu dot org
@ 2006-06-15  0:06 ` mmitchel at gcc dot gnu dot org
  2006-06-15  3:52 ` [Bug c++/27648] [4.0/4.1 " mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-15  0:06 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27648


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/27648] [4.0/4.1 Regression] ICE on attribute on pointers in static_cast
  2006-05-17 19:55 [Bug c++/27648] New: ICE on alias attribute casting thor at math dot tu-berlin dot de
                   ` (6 preceding siblings ...)
  2006-06-15  0:06 ` mmitchel at gcc dot gnu dot org
@ 2006-06-15  3:52 ` mmitchel at gcc dot gnu dot org
  2006-06-15  6:01 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-15  3:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mmitchel at gcc dot gnu dot org  2006-06-15 03:47 -------
Fixed in 4.2.0.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1/4.2 Regression] ICE|[4.0/4.1 Regression] ICE on
                   |on attribute on pointers in |attribute on pointers in
                   |static_cast                 |static_cast


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27648


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/27648] [4.0/4.1 Regression] ICE on attribute on pointers in static_cast
  2006-05-17 19:55 [Bug c++/27648] New: ICE on alias attribute casting thor at math dot tu-berlin dot de
                   ` (7 preceding siblings ...)
  2006-06-15  3:52 ` [Bug c++/27648] [4.0/4.1 " mmitchel at gcc dot gnu dot org
@ 2006-06-15  6:01 ` mmitchel at gcc dot gnu dot org
  2006-06-15  6:04 ` [Bug c++/27648] [4.0 " mmitchel at gcc dot gnu dot org
  2007-02-03 17:02 ` gdr at gcc dot gnu dot org
  10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-15  6:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from mmitchel at gcc dot gnu dot org  2006-06-15 06:01 -------
Subject: Bug 27648

Author: mmitchel
Date: Thu Jun 15 06:00:49 2006
New Revision: 114672

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114672
Log:
        PR c++/27648
        * parser.c (cp_parser_declarator): Robustify.
        PR c++/27648
        * g++.dg/ext/attrib22.C: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/attrib22.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=27648


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/27648] [4.0 Regression] ICE on attribute on pointers in static_cast
  2006-05-17 19:55 [Bug c++/27648] New: ICE on alias attribute casting thor at math dot tu-berlin dot de
                   ` (8 preceding siblings ...)
  2006-06-15  6:01 ` mmitchel at gcc dot gnu dot org
@ 2006-06-15  6:04 ` mmitchel at gcc dot gnu dot org
  2007-02-03 17:02 ` gdr at gcc dot gnu dot org
  10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-15  6:04 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW
            Summary|[4.0/4.1 Regression] ICE on |[4.0 Regression] ICE on
                   |attribute on pointers in    |attribute on pointers in
                   |static_cast                 |static_cast


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27648


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/27648] [4.0 Regression] ICE on attribute on pointers in static_cast
  2006-05-17 19:55 [Bug c++/27648] New: ICE on alias attribute casting thor at math dot tu-berlin dot de
                   ` (9 preceding siblings ...)
  2006-06-15  6:04 ` [Bug c++/27648] [4.0 " mmitchel at gcc dot gnu dot org
@ 2007-02-03 17:02 ` gdr at gcc dot gnu dot org
  10 siblings, 0 replies; 13+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 17:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from gdr at gcc dot gnu dot org  2007-02-03 17:02 -------
Fixed in GCC-4.1.2.


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.0.4                       |4.1.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27648


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-02-03 17:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-17 19:55 [Bug c++/27648] New: ICE on alias attribute casting thor at math dot tu-berlin dot de
2006-05-17 20:58 ` [Bug c++/27648] [4.0/4.1/4.2 Regression] ICE on attribute on pointers in static_cast pinskia at gcc dot gnu dot org
2006-05-21 21:12 ` pinskia at gcc dot gnu dot org
2006-05-22 18:40 ` janis at gcc dot gnu dot org
2006-05-22 18:44   ` Andrew Pinski
2006-05-22 18:45 ` pinskia at physics dot uc dot edu
2006-05-22 23:02 ` janis at gcc dot gnu dot org
2006-06-04 19:11 ` mmitchel at gcc dot gnu dot org
2006-06-15  0:06 ` mmitchel at gcc dot gnu dot org
2006-06-15  3:52 ` [Bug c++/27648] [4.0/4.1 " mmitchel at gcc dot gnu dot org
2006-06-15  6:01 ` mmitchel at gcc dot gnu dot org
2006-06-15  6:04 ` [Bug c++/27648] [4.0 " mmitchel at gcc dot gnu dot org
2007-02-03 17:02 ` gdr at gcc dot gnu dot 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).