Bug 66121 - [5 Regression] internal compiler error: in strip_typedefs, at cp/tree.c:1369
Summary: [5 Regression] internal compiler error: in strip_typedefs, at cp/tree.c:1369
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 5.1.0
: P2 normal
Target Milestone: 5.3
Assignee: Jason Merrill
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2015-05-12 11:16 UTC by Denis Demidov
Modified: 2015-08-17 16:05 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.9.2, 6.0
Known to fail: 5.1.0
Last reconfirmed: 2015-05-14 00:00:00


Attachments
The preprocessed code stripped with the delta tool. (38.68 KB, text/plain)
2015-05-12 11:16 UTC, Denis Demidov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Demidov 2015-05-12 11:16:09 UTC
Created attachment 35527 [details]
The preprocessed code stripped with the delta tool.

The following code (reduced from [vexcl](https://github.com/ddemidov/vexcl) library) leads to an internal compiler error:

$ cat strip_typedefs_ice.cpp
#include <memory>
typedef int32_t cl_int __attribute__((aligned(4)));
struct buffer_unmapper {
    void operator()(cl_int* ptr) const {
    }
};
typedef std::unique_ptr<cl_int[], buffer_unmapper> mapped_array;

$ g++ -c -std=c++11 strip_typedefs_ice.cpp                                                                                          
strip_typedefs_ice.cpp:7:50: internal compiler error: in strip_typedefs, at cp/tree.c:1369
 typedef std::unique_ptr<cl_int[], buffer_unmapper> mapped_array;
                                                  ^
Comment 1 Marek Polacek 2015-05-14 12:03:34 UTC
Fixed on trunk with r222529.
Comment 2 Richard Biener 2015-06-29 08:20:57 UTC
Still a regression for GCC 5 (works with 4.9.2 for me and indeed fixed on trunk).
Comment 3 Richard Biener 2015-07-16 09:11:12 UTC
GCC 5.2 is being released, adjusting target milestone to 5.3.
Comment 4 Jason Merrill 2015-08-17 16:05:57 UTC
Fixed for 5.3 as well.